Reputation: 3923
I am trying to enable mod_deflate. I have Apache 2.0+ and tried this code in my .htaccess file:
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css
<FilesMatch "\\.(js|css|html|htm|php|xml)$">
SetOutputFilter DEFLATE
</FilesMatch>
It did not compress any of my files when I tested my site in firebug. What am I doing wrong?
Upvotes: 1
Views: 814
Reputation: 3923
SetOutputFilter DEFLATE
I used this and it worked. It was an internet history problem. My yahoo Yslow was saving the results from the first check so when I modified the htaccess the difference did not show up.
Upvotes: 1
Reputation:
As this'll be moved to SF soon, Shouldn't it be:
<FilesMatch "\.(js|css|html|htm|php|xml)$">
Otherwise the regex becomes \.js
, for example (because you've escaped the '\').
Upvotes: 1