I looked in Apache’s error_log file and noticed multiple lines like this:
an unknown filter was not added: DEFLATE
After thinking a bit I recalled that I added the following line in the .htaccess file in the root directory for on one of my domains, but never tested it properly:
AddOutputFilterByType DEFLATE text/html text/plain text/xml
The fix is easy: enable mod_deflate. On Ubuntu:
$ sudo a2enmod deflate Module deflate installed; run /etc/init.d/apache2 force-reload to enable. $ sudo /etc/init.d/apache2 force-reload * Forcing reload of apache 2.0 web server...
Why did I add the above filter line in the first place? It was suggested by YSlow.
Update Another kind of fix is of course to remove AddOutputFilterByType.
Thank you, this helps a lot.
Thanks a ton!
It saved my life
Thanks!
oh…my code did not appear in the last message…trying again…
Thanks – i was in exactly same situation
I read the YSlow book and forgot to add the mod_deflate.c after moving to a new server.
Just another alternative fix…wrap that line within :
(open bracket) IfModule mod_deflate.c (close bracket)
like so:
(open bracket) IfModule mod_deflate.c (close bracket)
#Compress everything except images -note some images have the .php extension -start
..stuff that was to do with deflating…
#Compress everything except images -end
(open bracket)/IfModule(close bracket)
This means you can stave the problem if the site migrates.