添加过期 headers Plesk

Add Expires headers Plesk

我的网站从 pingdom 工具中收到添加过期 headers 错误。我搜索并找到了将以下代码添加到 .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 设置。更改了过期设置但没有解决问题。我还可以做些什么?谢谢

mod_expires 在 apache 上被禁用。我激活它并工作。