I serve pre-compressed CSS and JS files on my site, and IE6-8 and FF
is working perfectly with my .htaccess file.
# Compressed files
RewriteCond %{HTTP:Accept-Encoding} .*gzip.*
AddEncoding x-gzip .gz
AddType application/x-javascript .gz
AddType text/css .gz
I call the files with the .gz extension already [example]:
<link rel="stylesheet" type="text/css" media="all" href="css/layout.css.gz" />
So why is this breaks in google Chrome?
Thanks.
Download Fiddler and look at the raw response headers to see what the server is sending back for that particular request.
FYI, Fiddler is a client side proxy that filters your browser requests through. Super informative when dealing with these kind of issues.
— Update
Upon further investigation, it doesn’t appear that your RewriteCond is actually doing what you think it is doing. According to the Documentation, the RewriteCond directive is only used in conjunction with a RewriteRule.