We used this PHP code to disable gzip compression for specific scripts
But our admin migrated to FastCGI and this does not work anymore. How to do it?
Off the top of my head I don't recall the specific rules to apply but it's likely that your answer is using a rewrite rule in htaccess to set the environment for Apache whenever certain scripts are accessed that you don't want gzip compression used on.
I believe it's something like:
The only times this wouldn't be the best choice is if you don't know which scripts ahead of time that need to be set to not have their output compressed or if you need to set it on/off based on dynamic logic within the script.
There's another way to do it which would keep FastCGI from caching the output but that would defeat the purpose. The htaccess method is probably best.