5

Compress HTML using Apache

view full story
linux-howto

http://serverfault.com – I'm using Apache to compress render HTML files but it's not working. Why? I'm usng hostmonster servers and YII PHP framework. .htaccess: <IfModule deflate_module> AddOutputFilterByType DEFLATE text/html text/plain text/xml text/javascript text/css application/json application/javascript # Netscape 4.x has some problems... BrowserMatch ^Mozilla/4 gzip-only-text/html # Netscape 4.06-4.08 have some more problems BrowserMatch ^Mozilla/4\.0[678] no-gzip # MSIE masquerades as Netscape, but it is fine BrowserMatch \bMSIE !no-gzip !gzip-only-text/html # Do NOT compress localhost #SetEnvIf (HowTos)