Re: Serving gz files
Posted by:
CyberSpatium
(71.237.217.---)
Date: March 03, 2007 02:10PM
there are two ways you can do this. the easiest way is to just create an .htaccess file instead of having to edit a config file:
.htaccess file:
<files *.js.gz>
AddType "text/javascript" .gz
AddEncoding gzip .gz
</files>
make sure you save that file as .htaccess and remember to include the dot ( . ) before the name htaccess.
if you do not want to use .htaccess file, then you can edit your httpd.conf file ( C:\wamp\Apache2\conf\httpd.conf )
find:
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
AddType application/x-httpd-php .php
AddType application/x-httpd-php .php3
change to:
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
AddType application/x-httpd-php .php
AddType application/x-httpd-php .php3
AddType text/javascript .gz
find:
#AddEncoding x-gzip .gz .tgz
remove the # at the beginning of the line to enable this setting:
AddEncoding x-gzip .gz .tgz
now restart apache to make the new settings take effect.
CyberSpatium
----------------------------
Wamp English Forum Admin