Skip to content

Instantly share code, notes, and snippets.

@zakki
Created July 10, 2014 12:19
Show Gist options
  • Save zakki/289b5699408c9ed4e2aa to your computer and use it in GitHub Desktop.
Save zakki/289b5699408c9ed4e2aa to your computer and use it in GitHub Desktop.
RewriteEngine on
RewriteCond %{HTTP:Accept-Encoding} gzip
RewriteCond %{REQUEST_FILENAME}\.gz -s
RewriteRule .+ %{REQUEST_URI}.gz
<FilesMatch "\.js\.gz$">
ForceType application/x-javascript
AddEncoding x-gzip .gz
</FilesMatch>
<FilesMatch "\.data\.gz$">
ForceType application/octet-stream
AddEncoding x-gzip .gz
</FilesMatch>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment