How do I disable Apache compression per virtual host or per directory? Is this done through a modification to the http.conf file, a .htaccess file or something else?

link|improve this question

33% accept rate
feedback

1 Answer

This question on stackoverflow will probably help you.

I cite:

# for URL paths that begin with "/foo/bar/"
SetEnvIf Request_URI ^/foo/bar/ no-gzip=1

# for files that end with ".py"
<FilesMatch \.py$>
    SetEnv no-gzip 1
</FilesMatch>

So you can try something like:

<Directory /home/user/www>
    SetEnv no-gzip 1
[...]
</Directory>
link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.