2

I'm trying to use gzip on my site.

I'm trying to compress, php, css and js files. The server is apache 1.3, and the code I have in the .htaccess file is:

# compress all text & html:
AddOutputFilterByType DEFLATE text/html text/plain text/xml

But when I upload this, I just get an Error 500 page.

Any ideas.

2
  • What does your Apache error log say? There's probably some more detail in there... Commented Feb 1, 2010 at 15:51
  • using the below doesn't seem to have any effect at all: <IfModule mod_gzip.c> mod_gzip_on Yes mod_gzip_dechunk Yes mod_gzip_item_include file \.(html?|txt|css|js|php|pl|jpg|png|gif)$ mod_gzip_item_include handler ^cgi-script$ mod_gzip_item_include mime ^text/.* mod_gzip_item_include mime ^application/x-javascript.* mod_gzip_item_exclude mime ^image/.* mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.* </IfModule> Commented Feb 1, 2010 at 15:59

2 Answers 2

3

Try this

<Files *>
    #Compress
    SetOutputFilter GZIP
</Files>

Or this

<ifmodule mod_deflate.c>
AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript text/javascript
</ifmodule>
Sign up to request clarification or add additional context in comments.

Comments

0

AddOutputFilterByType doesn't appear to be available on Apache 1.3 (src). I believe you'll need to use mod_gzip instead.

"Compatibility: Available in Apache 2.0.33 and later; deprecated in Apache 2.1 and later"

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.