Apache: Avoid bad requests….

Add this this to httpd.conf:

<IfModule mod_deflate.c>
    # The following line is enough for .js and .css
    AddOutputFilter DEFLATE js css

    # The following line also enables compression by file content type, for the 
    # following list of Content-Types:
    AddOutputFilterByType DEFLATE text/html text/plain text/xml application/xml

    # The following lines are to avoid bugs with some browsers
    BrowserMatch ^Mozilla/4 gzip-only-text/html
    BrowserMatch ^Mozilla/4\.0[678] no-gzip
    BrowserMatch \bMSIE !no-gzip !gzip-only-text/html


Copying from this page is a pain in the butt. Here’s the above text in a gzip archive: MOD_DEFLATE