尝试将过期标头添加到.htaccess时出现500错误 [英] 500 error when trying to add expires header to .htaccess
本文介绍了尝试将过期标头添加到.htaccess时出现500错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正试图通过编辑.htaccess文件来添加一个远期过期标头
I'm trying to add a far future expires header by editing my .htaccess file
这是yslow性能规则中建议的
this is recommended in the yslow performance rules
但是,当我这样做时,会收到500个内部服务器错误
but when I do, I get a 500 internal server error
这是我正在使用的代码,任何人都知道怎么回事?
here's the code I'm using, any body know what's up?
ExpiresActive On
ExpiresDefault A0
ExpiresByType image/gif A2592000
ExpiresByType image/png A2592000
ExpiresByType image/jpg A2592000
ExpiresByType image/jpeg A2592000
ExpiresByType image/ico A2592000
ExpiresByType text/css A2592000
ExpiresByType text/javascript A2592000
推荐答案
在此apache版本中,我好像没有mod_expires,可以解决此问题
Looks like I didn't have mod_expires in this apache build, that will fix it
这篇关于尝试将过期标头添加到.htaccess时出现500错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文