Created
December 3, 2013 07:38
-
-
Save sheeplogh/7765418 to your computer and use it in GitHub Desktop.
mod_deflate config sample from http://httpd.apache.org/docs/2.2/mod/mod_deflate.html + http://blog.nomadscafe.jp/2011/02/httpplack.html
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
<Location /> | |
### COMPRESS EVERYTHING EXCEPT IMAGES >> ### | |
# Insert filter | |
SetOutputFilter DEFLATE | |
# 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(7/8) masquerades as Mozilla4, but it is fine | |
BrowserMatch \bMSIE\s(7|8) !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 | |
### << COMPRESS EVERYTHING EXCEPT IMAGES ### | |
</Location> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment