试图用gzip用的.htaccess时收到错误500 [英] getting error 500 when trying to use gzip with .htaccess
本文介绍了试图用gzip用的.htaccess时收到错误500的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想用gzip在我的网站。
I'm trying to use gzip on my site.
我想COM preSS,PHP,CSS和JS文件。服务器是Apache的1.3,code我在.htaccess文件是:
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
但是当我上传这个,我刚刚得到一个错误500页。
But when I upload this, I just get an Error 500 page.
任何想法。
推荐答案
试试这个
<Files *>
#Compress
SetOutputFilter GZIP
</Files>
或者这
<ifmodule mod_deflate.c>
AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript text/javascript
</ifmodule>
这篇关于试图用gzip用的.htaccess时收到错误500的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文