setting up Mod Deflate

We had an odd issue setting up Mod Deflate on one of our servers this week. It turns out in order to activate compression on our php/html pages we needed to add a line in our .htaccess file to explicitly prevent gif, jpg, and png images from being compressed). I’m still not 100% sure why this worked, but the code that got all of our pages to compress is copied below:

SetOutputFilter DEFLATE
SetEnvIfNoCase Request_URI "\.(?:gif|jpe?g|png)$" no-gzip

Leave a Reply

Your email address will not be published. Required fields are marked *