-
Notifications
You must be signed in to change notification settings - Fork 0
/
.htaccess
75 lines (49 loc) · 1.19 KB
/
.htaccess
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
Options -Indexes
<IfModule headers_module>
# Send X-Content-Type-Options to prevent MIME-Type confusion
Header always add X-Content-Type-Options "nosniff"
# Send X-Frame-Options to prevent ClickJacking attacks
Header always add X-Frame-Options "DENY"
</IfModule>
<IfModule php5_module>
# Set session cookie to use HttpOnly, which is more secure
php_value session.cookie_httponly true
</IfModule>
<FilesMatch "\.(php|log)$">
# Deny access to all php scripts and logs
Order Deny,Allow
Deny from all
# Allow only from localhost
Allow from 127.0.0.1
Allow from localhost
Allow from ::1
</FilesMatch>
<FilesMatch "index.php">
# Allow viewing index.php
Order Allow,Deny
Allow from all
</FilesMatch>
<FilesMatch "style.php">
# Allow retrieving style
Order Allow,Deny
Allow from all
</FilesMatch>
<FilesMatch "query_">
# Allow queries
Order Allow,Deny
Allow from all
</FilesMatch>
<FilesMatch "setup.php">
# Allow setup
Order Allow,Deny
Allow from all
</FilesMatch>
<FilesMatch "tmp.php">
# TMP
Order Allow,Deny
Allow from all
</FilesMatch>
# Hide PHP Errors
php_flag display_startup_errors off
php_flag display_errors off
php_flag html_errors off