尝试将 gzip 与 .htaccess 一起使用时出现错误 500
我正在尝试在我的网站上使用 gzip。
我正在尝试压缩 php、css 和 js 文件。服务器是 apache 1.3,我在 .htaccess 文件中的代码是:
# compress all text & html:
AddOutputFilterByType DEFLATE text/html text/plain text/xml
但是当我上传此文件时,我只得到一个错误 500 页面。
任何想法。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
试试这个
或者这个
Try this
Or this
AddOutputFilterByType 似乎在 Apache 1.3 上不可用(src)。我相信您需要使用 mod_gzip 代替。
“兼容性:在 Apache 2.0.33 及更高版本中可用;在 Apache 2.1 及更高版本中已弃用”
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"