开发者

getting error 500 when trying to use gzip with .htaccess

开发者 https://www.devze.com 2022-12-19 06:53 出处:网络
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:

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.


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>


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"

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号