This is an old revision of the document!
How to disable gzip compression on VH level while enabled globally?
Gzip compression can normally be enabled/disabled from server level. However sometime you may have to control the gzip compression for a particular virtual host through .htaccess to override server setttings. There are two ways to turn off gzip dynamically, either with a rewrite rule or SetEnv/SetEnvIf in .htaccess. SetEnv/SetEnvIf is better as it wont be affected by other rewrite rules.
Use rewrite rule in .htaccess
You can place the following in .htaccess:
RewriteRule . - [E=no-gzip:1]
but be aware that other rewrite rules may affect it.
User SetEnv/SetEnvIf in .htaccess
You can place the following in .htaccess:
SetEnv no-gzip 1