|
I have a much better way of enabling it and best of all it works throughout your site from one location.
Add the following into your .htaccess file:
<IfModule mod_gzip.c>
mod_gzip_on Yes
mod_gzip_static_suffix .gz
AddEncoding gzip .gz
# Save temporary work files [Yes, No]
mod_gzip_keep_workfiles No
mod_gzip_maximum_file_size 500000
mod_gzip_maximum_inmem_size 60000
mod_gzip_handle_methods GET POST
###############
### filters ###
###############
mod_gzip_item_exclude reqheader "User-agent: Mozilla/4.0[678]"
# HTML, CGI scripts, PHP
mod_gzip_item_include file \.html$
mod_gzip_item_include file \.php$
mod_gzip_item_include file \.pl$
mod_gzip_item_include mime ^text/html$
mod_gzip_item_include mime ^text/plain$
mod_gzip_item_include mime ^httpd/unix-directory$
# DO NOT DO JavaScript & CSS (due to Netscape4 bugs)
mod_gzip_item_exclude file \.js$
mod_gzip_item_exclude file \.css$
mod_gzip_item_exclude mime ^image/
mod_gzip_dechunk Yes
mod_gzip_add_header_count Yes
mod_gzip_send_vary On
</IfModule>
|