How to disable gzip compression using htaccess
Check here: https://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 ^(.*)$ $1 [NS,E=no-gzip:1,E=dont-vary:1]
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.