Skip to content

Instantly share code, notes, and snippets.

@steveh80
steveh80 / .htaccess
Created December 1, 2012 17:10
Wie gzip-komprimierte Seiten (laut Support-Auskunft) via .htaccess bei 1&1 funktionieren sollen
<IfModule mod_rewrite.c>
# If the user agent accepts gzip encoding...
RewriteCond %{HTTP:Accept-Encoding} gzip
# ...and if gzip-encoded version of the requested file exists (<file>.gz)...
RewriteCond %{REQUEST_FILENAME}.gz -f
# ...then serve the gzip-encoded file. Done.
RewriteRule ^(.+)$ $1.gz [L]
# Or if the user agent accepts gzip encoding...
RewriteCond %{HTTP:Accept-Encoding} gzip
# ...and the requested file exists...