我的网站收到来自pingdom工具的添加过期报头错误。我搜索并找到了解决方案,将以下代码添加到.htaccess文件中。
<IfModule mod_expires.c> ExpiresActive On ExpiresByType image/jpg "access 1 year" ExpiresByType image/jpeg "access 1 year" ExpiresByType image/gif "access 1 year" ExpiresByType image/png "access 1 year" ExpiresByType text/css "access 1 month" ExpiresByType text/html "access 1 month" ExpiresByType application/pdf "access 1 month" ExpiresByType text/x-javascript "access 1 month" ExpiresByType application/x-shockwave-flash "access 1 month" ExpiresByType image/x-icon "access 1 year" ExpiresDefault "access 1 month" </IfModule>
但是我还是得到了同样的错误。在plesk中,我找到了apache & nginx设置。已更改过期设置,但未解决问题。我还能做什么?谢谢

发布于 2019-05-08 18:57:34
mod_expires在apache上被禁用。我激活了它并开始工作。
https://stackoverflow.com/questions/56038105
复制相似问题