... | ... | @@ -25,7 +25,7 @@ |
|
|
############################################
|
|
|
## default index file
|
|
|
|
|
|
DirectoryIndex index.php
|
|
|
DirectoryIndex index.html index.php
|
|
|
|
|
|
<IfModule mod_php5.c>
|
|
|
|
... | ... | @@ -73,42 +73,31 @@ |
|
|
</IfModule>
|
|
|
|
|
|
<IfModule mod_deflate.c>
|
|
|
## Compress HTML, CSS, JavaScript, Text, XML and fonts
|
|
|
#AddOutputFilterByType DEFLATE application/javascript
|
|
|
#AddOutputFilterByType DEFLATE application/rss+xml
|
|
|
#AddOutputFilterByType DEFLATE application/vnd.ms-fontobject
|
|
|
#AddOutputFilterByType DEFLATE application/x-font
|
|
|
#AddOutputFilterByType DEFLATE application/x-font-opentype
|
|
|
#AddOutputFilterByType DEFLATE application/x-font-otf
|
|
|
#AddOutputFilterByType DEFLATE application/x-font-truetype
|
|
|
#AddOutputFilterByType DEFLATE application/x-font-ttf
|
|
|
#AddOutputFilterByType DEFLATE application/x-javascript
|
|
|
#AddOutputFilterByType DEFLATE application/xhtml+xml
|
|
|
#AddOutputFilterByType DEFLATE application/xml
|
|
|
#AddOutputFilterByType DEFLATE font/opentype
|
|
|
#AddOutputFilterByType DEFLATE font/otf
|
|
|
#AddOutputFilterByType DEFLATE font/ttf
|
|
|
#AddOutputFilterByType DEFLATE image/svg+xml
|
|
|
#AddOutputFilterByType DEFLATE image/x-icon
|
|
|
#AddOutputFilterByType DEFLATE text/css
|
|
|
#AddOutputFilterByType DEFLATE text/html
|
|
|
#AddOutputFilterByType DEFLATE text/javascript
|
|
|
#AddOutputFilterByType DEFLATE text/plain
|
|
|
#AddOutputFilterByType DEFLATE text/xml
|
|
|
|
|
|
## Remove browser bugs (only needed for really old browsers)
|
|
|
#BrowserMatch ^Mozilla/4 gzip-only-text/html
|
|
|
#BrowserMatch ^Mozilla/4\.0[678] no-gzip
|
|
|
#BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
|
|
|
#Header append Vary User-Agent
|
|
|
|
|
|
SetOutputFilter DEFLATE
|
|
|
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/javascript image/svg+xml
|
|
|
BrowserMatch ^Mozilla/4 gzip-only-text/html
|
|
|
BrowserMatch ^Mozilla/4\.0[678] no-gzip
|
|
|
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
|
|
|
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
|
|
|
Header append Vary User-Agent env=!dont-vary
|
|
|
|
|
|
############################################
|
|
|
## enable apache served files compression
|
|
|
## http://developer.yahoo.com/performance/rules.html#gzip
|
|
|
|
|
|
# Insert filter on all content
|
|
|
###SetOutputFilter DEFLATE
|
|
|
# Insert filter on selected content types only
|
|
|
#AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript
|
|
|
|
|
|
# Netscape 4.x has some problems...
|
|
|
#BrowserMatch ^Mozilla/4 gzip-only-text/html
|
|
|
|
|
|
# Netscape 4.06-4.08 have some more problems
|
|
|
#BrowserMatch ^Mozilla/4\.0[678] no-gzip
|
|
|
|
|
|
# MSIE masquerades as Netscape, but it is fine
|
|
|
#BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
|
|
|
|
|
|
# Don't compress images
|
|
|
#SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
|
|
|
|
|
|
# Make sure proxies don't deliver the wrong content
|
|
|
#Header append Vary User-Agent env=!dont-vary
|
|
|
|
|
|
</IfModule>
|
|
|
|
|
|
<IfModule mod_ssl.c>
|
... | ... | @@ -156,6 +145,21 @@ |
|
|
RewriteCond %{REQUEST_METHOD} ^TRAC[EK]
|
|
|
RewriteRule .* - [L,R=405]
|
|
|
|
|
|
<IfModule mod_setenvif.c>
|
|
|
<IfModule mod_headers.c>
|
|
|
|
|
|
############################################
|
|
|
# X-Content-Type-Options: nosniff disable content-type sniffing on some browsers.
|
|
|
Header set X-Content-Type-Options: nosniff
|
|
|
|
|
|
############################################
|
|
|
# This header forces to enables the Cross-site scripting (XSS) filter in browsers (if disabled)
|
|
|
BrowserMatch \bMSIE\s8 ie8
|
|
|
Header set X-XSS-Protection: "1; mode=block" env=!ie8
|
|
|
|
|
|
</IfModule>
|
|
|
</IfModule>
|
|
|
|
|
|
############################################
|
|
|
## redirect for mobile user agents
|
|
|
|
... | ... | @@ -190,17 +194,15 @@ |
|
|
AddDefaultCharset Off
|
|
|
#AddDefaultCharset UTF-8
|
|
|
|
|
|
<ifModule mod_expires.c>
|
|
|
ExpiresActive On
|
|
|
############################################
|
|
|
## Add default Expires header
|
|
|
## http://developer.yahoo.com/performance/rules.html#expires
|
|
|
#<FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$">
|
|
|
# ExpiresDefault "access plus 1 year"
|
|
|
#</FilesMatch>
|
|
|
ExpiresDefault "access plus 1 year"
|
|
|
<IfModule mod_expires.c>
|
|
|
|
|
|
</ifModule>
|
|
|
############################################
|
|
|
## Add default Expires header
|
|
|
## http://developer.yahoo.com/performance/rules.html#expires
|
|
|
|
|
|
ExpiresDefault "access plus 1 year"
|
|
|
|
|
|
</IfModule>
|
|
|
|
|
|
############################################
|
|
|
## By default allow all access
|
... | ... | @@ -220,7 +222,7 @@ |
|
|
## If running in cluster environment, uncomment this
|
|
|
## http://developer.yahoo.com/performance/rules.html#etags
|
|
|
|
|
|
FileETag none
|
|
|
#FileETag none
|
|
|
|
|
|
###########################################
|
|
|
## Deny access to cron.php
|
... | ... | @@ -246,4 +248,5 @@ |
|
|
Deny from all
|
|
|
|
|
|
</Files>
|
|
|
|
|
|
````` |