.htaccess缓存没有效果

时间:2016-06-05 16:24:54

标签: .htaccess caching

我在更改服务器中的缓存策略时遇到问题。我已经改变了.htaccess:

Options -Indexes

为:

Options -Indexes
# BEGIN Expire headers
<IfModule mod_expires.c>
    ExpiresActive On
    ExpiresDefault "access plus 5 seconds"
    ExpiresByType image/x-icon "access plus 2592000 seconds"
    ExpiresByType image/jpeg "access plus 2592000 seconds"
    ExpiresByType image/png "access plus 2592000 seconds"
    ExpiresByType image/gif "access plus 2592000 seconds"
    ExpiresByType application/x-shockwave-flash "access plus 2592000 seconds"
    ExpiresByType text/css "access plus 604800 seconds"
    ExpiresByType text/javascript "access plus 648000 seconds"
    ExpiresByType application/javascript "access plus 648000 seconds"
    ExpiresByType application/x-javascript "access plus 648000 seconds"
    ExpiresByType text/html "access plus 600 seconds"
    ExpiresByType application/xhtml+xml "access plus 600 seconds"
</IfModule>
# END Expire headers

但是,这似乎对缓存政策没有影响(使用google page insights检查)。关于我做错什么的任何想法?

0 个答案:

没有答案