var sidebar_align = 'right';
var content_container_margin = parseInt('350px');
var sidebar_width = parseInt('330px');
Help Please :: Can't do gzip compression via .htaccess
I am trying to use gzip compression on entire site, however am having no success.
Here is what I have added in .htaccess file
Not sure if below info will be useful in solving the problem, but here it is:
mod_gzip_item_include file \.(html?|txt|css|js|php|pl)$
mod_gzip_item_include handler ^cgi-script$
mod_gzip_item_include mime ^text\.*
mod_gzip_item_exclude mime ^image\.*
mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
1. Am on dedicated server (cPanel)
2. In PHP info file I do see:
Accept-Encoding gzip,deflate under Apache Environment & HTTP Headers Information
_SERVER["HTTP_ACCEPT_ENCODING"] gzip,deflate under PHP Variables
Thanks for the help.
mod_gzip needs to be properly installed.
Do check with your hosting provider support team.
I just finished talking with support personal at hosting company and for my satisfaction they looked into it again and made sure that Apache is compiled with mod_deflate as suggested in the following link:
However I am still not able to gzip via htaccess.
Alright support staff took care of the issue and now I am able to do the gzip compression using below line in htaccess
Am also glad to say it is working just fine, however it does not seem to compress css file.
AddOutputFilterByType DEFLATE text/html text/plain text/xml
I tried changed above code to
but no success. Anyone knows on how to compress css files too?
P.S. I read somewhere compressing images is not a good idea. Is that right?
Problem Solved : Thanks for helping.
Last edited by SWDevil; 08-12-2009 at
By koolnhot in forum Hosting Security and Technology
Last Post: 04-24-2009, 08:02 AM
By mesobob in forum Computers and Peripherals
Last Post: 09-12-2007, 06:22 PM
By section31 in forum Programming Discussion
Last Post: 10-05-2004, 10:35 PM
By Kattilyn in forum Programming Discussion
Last Post: 10-16-2003, 11:07 PM
By clocker1996 in forum Hosting Security and Technology
Last Post: 12-13-2001, 05:55 PM
Tags for this Thread