Mobile app version of vmapp.org
Login or Join
RJPawlick198

: How to disable gzip compression using htaccess I want to disable gzip compression in my site using htaccess. I have the code below in htaccess: php_flag zlib.output_compression off But it is

@RJPawlick198

Posted in: #Gzip #Htaccess

I want to disable gzip compression in my site using htaccess.

I have the code below in htaccess:

php_flag zlib.output_compression off


But it is not working.

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @RJPawlick198

2 Comments

Sorted by latest first Latest Oldest Best

 

@Shanna517

A simpler one that also works:
SetEnv no-gzip 1

The line you were using disables PHP's compression. The no-gzip env variable, on the other hand, disables Apache compression.

10% popularity Vote Up Vote Down


 

@RJPawlick198

Check here: stackoverflow.com/questions/9249243/how-to-disable-apache-gzip-compression-for-some-media-files-in-htaccess-file
It's possible, but looks like it will disable gzip for the whole website.

Keep in mind that you are telling PHP not to gzip, but Apache may still be gzipping so this should sort it, but check Apache config.

RewriteRule ^(.*)$ [NS,E=no-gzip:1,E=dont-vary:1]

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme