This repository was archived by the owner on Nov 20, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.htaccess
125 lines (106 loc) · 2.63 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
RewriteEngine On
ServerSignature Off
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.+)$ ./index.php [QSA,L]
Options All -Indexes
ErrorDocument 400 /view/err/400.php
ErrorDocument 401 /view/err/401.php
ErrorDocument 403 /view/err/403.php
ErrorDocument 404 /view/err/404.php
ErrorDocument 408 /view/err/408.php
ErrorDocument 414 /view/err/414.php
ErrorDocument 429 /view/err/429.php
ErrorDocument 500 /view/err/500.php
ErrorDocument 502 /view/err/502.php
ErrorDocument 503 /view/err/503.php
ErrorDocument 504 /view/err/504.php
#RewriteCond %{HTTPS} off
#RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
php_value memory_limit 256M
php_value post_max_size 256M
php_value upload_max_filesize 64M
php_value max_input_vars 1800
php_value max_execution_time 300
php_value max_input_time 300
<FilesMatch \.(phps|php2|php3|php4|php5|phtml|pl|py|jsp|asp|htm|html|shtml|sh|cgi)$>
Order Deny,Allow
Deny from all
</FilesMatch>
<Files *.php>
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
Allow from localhost
</Files>
<Files *.log>
Order Deny,Allow
Deny from all
</Files>
<Files index.php>
Order Allow,Deny
Allow from all
</Files>
<Files dl.php>
Order Allow,Deny
Allow from all
</Files>
<Files 400.php>
Order Allow,Deny
Allow from all
</Files>
<Files 401.php>
Order Allow,Deny
Allow from all
</Files>
<Files 403.php>
Order Allow,Deny
Allow from all
</Files>
<Files 404.php>
Order Allow,Deny
Allow from all
</Files>
<Files 408.php>
Order Allow,Deny
Allow from all
</Files>
<Files 500.php>
Order Allow,Deny
Allow from all
</Files>
<Files 502.php>
Order Allow,Deny
Allow from all
</Files>
<Files 503.php>
Order Allow,Deny
Allow from all
</Files>
<Files 504.php>
Order Allow,Deny
Allow from all
</Files>
<IfModule mod_setenvif.c>
<IfModule mod_headers.c>
Header always set X-Frame-Options "DENY" "expr=%{CONTENT_TYPE} =~ m#text/html#i"
Header always set X-Content-Type-Options "nosniff"
Header unset X-Powered-By
Header always unset X-Powered-By
<FilesMatch "\.(jpe?g|png|webp|bmp|gif|ico)$">
SetEnvIf Origin ":" IS_CORS
Header set Access-Control-Allow-Origin "*" env=*IS_CORS*
</FilesMatch>
</IfModule>
</IfModule>
<IfModule mod_expires.c>
ExpiresActive on
ExpiresDefault "access plus 1 day"
ExpiresByType text/html "access plus 1 day"
ExpiresByType text/javascript "access plus 1 day"
ExpiresByType text/css "access plus 1 day"
</IfModule>
<IfModule mod_autoindex.c>
Options -Indexes
</IfModule>