Skip to content

Instantly share code, notes, and snippets.

@kennethreitz
Created March 29, 2010 04:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kennethreitz/347371 to your computer and use it in GitHub Desktop.
Save kennethreitz/347371 to your computer and use it in GitHub Desktop.
Apache htaccess for gzip compression
<IfModule mod_deflate.c>
SetOutputFilter DEFLATE
# file-types indicated will not be compressed
SetEnvIfNoCase Request_URI
\.(?:gif|jpe?g|png|rar|zip|pdf)$ no-gzip dont-vary
<IfModule mod_headers.c>
Header append Vary User-Agent
</IfModule>
</IfModule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment