5

我有一个处理浏览器缓存的 .htaccess 文件。我用文件扩展名设置规则。如何修改以下代码段以从浏览器缓存中排除特定目录

<FilesMatch "\.(gif|png|jpg|js|css|ico|woff|eot|svg|ttf)$">
    Header set Cache-Control "max-age=2592000, public, must-revalidate"
    Header unset Last-Modified
</FilesMatch>

我有什么方法可以完全禁止这个目录中的缓存?

4

1 回答 1

2

You can try to overwrite parent cache function. Just replace another htaccess file under desired folder and set to cache for 1 sec. Worked for me.

ExpiresActive On
ExpiresDefault A1
Header append Cache-Control must-revalidate
于 2013-05-24T03:01:10.000 回答