You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

114 lines
4.9 KiB

# Requires mod_expires to be enabled. Uncomment to enable mod_expires.
<IfModule mod_expires.c>
# Uncomment below to activate mode_expires
# ExpiresActive on
# ExpiresDefault "access plus 1 month"
# For CSS uncomment below
# ExpiresByType text/css "access plus 1 year"
# For Data interchange uncomment below
# ExpiresByType application/json "access plus 0 seconds"
# ExpiresByType application/xml "access plus 0 seconds"
# ExpiresByType text/xml "access plus 0 seconds"
# For Favicon uncomment below
# ExpiresByType image/x-icon "access plus 1 week"
# For HTML components (HTCs) uncomment below
# ExpiresByType text/x-component "access plus 1 month"
# For HTML uncomment below
# ExpiresByType text/html "access plus 0 seconds"
# For JavaScript uncomment below
# ExpiresByType application/javascript "access plus 1 year"
# For Manifest files uncomment below
# ExpiresByType application/x-web-app-manifest+json "access plus 0 seconds"
# ExpiresByType text/cache-manifest "access plus 0 seconds"
# For Media uncomment below
# ExpiresByType audio/ogg "access plus 1 month"
# ExpiresByType image/gif "access plus 1 month"
# ExpiresByType image/jpeg "access plus 1 month"
# ExpiresByType image/png "access plus 1 month"
# ExpiresByType video/mp4 "access plus 1 month"
# ExpiresByType video/ogg "access plus 1 month"
# ExpiresByType video/webm "access plus 1 month"
# For Web feeds uncomment below
# ExpiresByType application/atom+xml "access plus 1 hour"
# ExpiresByType application/rss+xml "access plus 1 hour"
# For Web fonts
# ExpiresByType application/font-woff "access plus 1 month"
# ExpiresByType application/vnd.ms-fontobject "access plus 1 month"
# ExpiresByType application/x-font-ttf "access plus 1 month"
# ExpiresByType font/opentype "access plus 1 month"
# ExpiresByType image/svg+xml "access plus 1 month"
</IfModule>
# Various rewrite rules.
<IfModule mod_rewrite.c>
RewriteEngine on
# Uncomment the following to redirect all visitors to the www version
# RewriteCond %{HTTP_HOST} !^www\. [NC]
# RewriteRule ^ http://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
# Uncomment the following to redirect all visitors to non www version
# RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
# RewriteRule ^ http://%1%{REQUEST_URI} [L,R=301]
# If your site is running in a VirtualDocumentRoot at http://example.com/,
# uncomment the following line:
# RewriteBase /
# Pass all requests not referring directly to files in the filesystem to index.php.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond $1 !^(index\.php)
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>
# Enable Gzip compression.
<IfModule mod_deflate.c>
# Force compression for mangled headers.
# http://developer.yahoo.com/blogs/ydn/posts/2010/12/pushing-beyond-gzipping
<IfModule mod_setenvif.c>
<IfModule mod_headers.c>
SetEnvIfNoCase ^(Accept-EncodXng|X-cept-Encoding|X{15}|~{15}|-{15})$ ^((gzip|deflate)\s*,?\s*)+|[X~-]{4,13}$ HAVE_Accept-Encoding
RequestHeader append Accept-Encoding "gzip,deflate" env=HAVE_Accept-Encoding
</IfModule>
</IfModule>
# Compress all output labeled with one of the following MIME-types
# (for Apache versions below 2.3.7, you don't need to enable `mod_filter`
# and can remove the `<IfModule mod_filter.c>` and `</IfModule>` lines
# as `AddOutputFilterByType` is still in the core directives).
AddOutputFilterByType DEFLATE application/atom+xml \
application/javascript \
application/json \
application/rss+xml \
application/vnd.ms-fontobject \
application/x-font-ttf \
application/x-web-app-manifest+json \
application/xhtml+xml \
application/xml \
font/opentype \
image/svg+xml \
image/x-icon \
text/css \
text/html \
text/plain \
text/x-component \
text/xml
</IfModule>