-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
.htaccess
109 lines (93 loc) · 3.36 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
########## S.2.U Firewall System 3.0 ##########
Options All -Indexes -MultiViews +FollowSymLinks
DirectoryIndex index.html index.php
AddDefaultCharset UTF-8
LimitRequestBody 10240000
<IfModule env_module>
SetEnv HTACCESS On
SetEnv TZ Asia/Saigon
</IfModule>
<IfModule mod_speling.c>
CheckSpelling On
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{ENV:REDIRECT_STATUS} 200
RewriteRule .* - [L]
RewriteCond %{HTTP_HOST} ^$
RewriteRule .* - [F,L]
RewriteCond %{REQUEST_METHOD} !^(GET|POST|HEAD) [NC]
RewriteRule .* - [R=405,L]
RewriteCond %{REQUEST_URI} \/$ [OR]
RewriteCond %{REQUEST_URI} \/\?$ [OR]
RewriteCond %{REQUEST_URI} \.html$ [OR]
RewriteCond %{REQUEST_URI} \.json$ [OR]
RewriteCond %{REQUEST_URI} \.php$
RewriteCond %{HTTP_COOKIE} !live [NC]
RewriteCond %{REQUEST_URI} !fw_admin\.php [NC]
RewriteCond %{REQUEST_URI} !fw_system\.php [NC]
RewriteCond %{THE_REQUEST} ^(POST|GET)[^?]+\??(.*)HTTP/ [NC]
RewriteRule .* S2U_FW/fw_system.php?s2m=%1&s2u=%{REQUEST_URI}&%2 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*)\.htm$ S2U_FW/cache/$1.htm [L]
</IfModule>
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access plus 1 year"
ExpiresByType image/jpeg "access plus 1 year"
ExpiresByType image/gif "access plus 1 year"
ExpiresByType image/png "access plus 1 year"
ExpiresByType text/css "access plus 1 month"
ExpiresByType application/pdf "access plus 1 month"
ExpiresByType text/x-javascript "access plus 1 month"
ExpiresByType application/x-shockwave-flash "access plus 1 month"
ExpiresByType image/x-icon "access plus 1 year"
ExpiresDefault "access plus 2 days"
</IfModule>
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
AddOutputFilterByType DEFLATE application/x-httpd-php
AddOutputFilterByType DEFLATE application/x-httpd-fastphp
AddOutputFilterByType DEFLATE image/svg+xml
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
</IfModule>
<IfModule mod_gzip.c>
mod_gzip_on Yes
mod_gzip_dechunk Yes
mod_gzip_item_include file .(html?|txt|css|js|php|pl)$
mod_gzip_item_include handler ^cgi-script$
mod_gzip_item_include mime ^text/.*
mod_gzip_item_include mime ^application/x-javascript.*
mod_gzip_item_exclude mime ^image/.*
mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
</IfModule>
<IfModule mod_headers.c>
<FilesMatch ".(ico|jpe?g|png|gif|swf)$">
Header set Cache-Control "max-age=2592000, public"
</FilesMatch>
<FilesMatch ".(css)$">
Header set Cache-Control "max-age=604800, public"
</FilesMatch>
<FilesMatch ".(js)$">
Header set Cache-Control "max-age=216000, private"
</FilesMatch>
<FilesMatch ".(x?html?|php)$">
Header set Cache-Control "max-age=600, private, must-revalidate"
</FilesMatch>
</IfModule>
<FilesMatch ".(htaccess|json|js|xml)$">
Order Allow,Deny
Deny from all
</FilesMatch>
########## S.2.U Firewall System 3.0 ##########