Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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 Remote_Host 127.0.0.1 no-gzip

# Make sure proxies don't deliver the wrong content
Header append Vary User-Agent env=!dont-vary
</IfModule>
share|improve this question

migrated from stackoverflow.com Jul 20 '12 at 15:23

This question came from our site for professional and enthusiast programmers.

1 Answer 1

I believe it is mod_deflate. Not deflate_module.

<IfModule mod_deflate>

Note: It looks like you took your code from the documentation. As noted in the docs, Do not use this unless you fully understand all the configuration details. As such, maybe start with just AddOutputFilterByType and expand from there.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.