Hi all
I'm new to the forum, but need some help regarding serving previously gzipped files. I need to gzip the files prior to serving, and not by the server.
So, i manually gzip the file, and my .htaccess looks like...
RewriteEngine on
AddEncoding x-gzip .gz
RewriteCond %{HTTP:Accept-encoding} gzip
RewriteCond %{REQUEST_FILENAME}.gz -f
RewriteRule ^(.*)$ $1.gz [QSA,L]
On one website, this works just fine. But on my localmachine, and a 2nd website, this doesn't work.
All 3 sites run apache(different servers). Mod_rewrite is enabled on all 3.
All 3 servers serve up the filename.js.gz, but only one actually works, and has the browser unzip it. On the other 2, the browser receives filename.js.gz, renames it to filename.js, and can't use it cause its not unzipped.
Why would this happen? any ideas?
Thanks all
marco
I'm new to the forum, but need some help regarding serving previously gzipped files. I need to gzip the files prior to serving, and not by the server.
So, i manually gzip the file, and my .htaccess looks like...
RewriteEngine on
AddEncoding x-gzip .gz
RewriteCond %{HTTP:Accept-encoding} gzip
RewriteCond %{REQUEST_FILENAME}.gz -f
RewriteRule ^(.*)$ $1.gz [QSA,L]
On one website, this works just fine. But on my localmachine, and a 2nd website, this doesn't work.
All 3 sites run apache(different servers). Mod_rewrite is enabled on all 3.
All 3 servers serve up the filename.js.gz, but only one actually works, and has the browser unzip it. On the other 2, the browser receives filename.js.gz, renames it to filename.js, and can't use it cause its not unzipped.
Why would this happen? any ideas?
Thanks all
marco