Created
March 6, 2013 10:03
-
-
Save yut148/5098241 to your computer and use it in GitHub Desktop.
apache css etc. gzip configuration example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Directory "/var/www/html"> | |
RewriteEngine on | |
RewriteCond %{HTTP:Accept-Encoding} gzip | |
RewriteCond %{REQUEST_FILENAME} !\.gz$ | |
RewriteCond %{REQUEST_FILENAME}\.gz -s | |
RewriteRule .+ %{REQUEST_URI}.gz | |
<files *.html.gz> | |
AddType "text/html;charset=utf-8" .gz | |
</files> | |
<files *.js.gz> | |
AddType "text/javascript;charset=utf-8" .gz | |
</files> | |
<files *.css.gz> | |
AddType "text/css" .gz | |
</files> | |
AddEncoding x-gzip .gz | |
Options Indexes FollowSymLinks | |
AllowOverride None | |
Order allow,deny | |
Allow from all | |
</Directory> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment