Skip to content

Instantly share code, notes, and snippets.

@silasb
Created March 30, 2012 17:16
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save silasb/2253052 to your computer and use it in GitHub Desktop.
Save silasb/2253052 to your computer and use it in GitHub Desktop.
GZip JS/CSS
AddEncoding gzip gz
RewriteEngine On
RewriteCond %{HTTP:Accept-Encoding} gzip
RewriteCond %{REQUEST_FILENAME}.gz -f
RewriteRule ^(.*)$ $1.gz [QSA,L]
<Files *.css.gz>
ForceType text/css
</Files>
<Files *.js.gz>
ForceType text/javascript
</Files>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment