Php – how to setup Apache’s Content-Encoding Header

apache-2.2http-headersmod-deflatePHP

When attempting to validate my site with the W3C validator, it returns the error, "Don't know how to decode Content-Encoding 'none'". Firebug confirms that my server is sending the header, "Content-Encoding: none".

But I can't find any directive in apache2.conf or in my vhost that sets the Content-Encoding header.

Where does the directive go, and what should it be set to?

UPDATE:

On further examination it seems something is wrong with mod_deflate (gzip). It's zipping my css files just fine, but is not zipping the html generated by my php scripts.

I have:

AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css

And the pages are showing a mime type of: "text/html". But content encoding is "none" and they aren't zipping. Perhaps these issues are related?

Best Answer

The header was being set by the PHP script, not in Apache. I didn't even think to look there until I stumbled on it by accident.