500 error when trying to add expires header to .htaccess

随声附和 提交于 2021-02-11 02:10:22

问题


I'm trying to add a far future expires header by editing my .htaccess file

this is recommended in the yslow performance rules

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

回答1:


Looks like I didn't have mod_expires in this apache build, that will fix it



来源:https://stackoverflow.com/questions/1439180/500-error-when-trying-to-add-expires-header-to-htaccess

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!