我正在重做整个网站,浏览器正在使用index.html
相同 URL 的缓存页面。
这是.htaccess
问题目录之一中文件的全部内容:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /products/
# Remove 'index.html' from the URL for old links that include it.
RewriteCond %{THE_REQUEST} ^.*\index\.html?\ HTTP/
RewriteRule ^(.*)index\.html?$ "/products/$1" [R=301,L]
# Use index.php for all requests.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^ /products/index.php [L]
</IfModule>
# An atempt to tell the browser not to use a cached .html file.
ExpiresActive on
ExpiresByType text/html "access plus 0 seconds"
<FilesMatch "\.(html)$">
Header set Cache-Control "private, must-revalidate"
</FilesMatch>
我在这里尝试了多种方法,但没有任何效果。这就是我在标题中看到的全部内容:
Request URL:http://www.example.com/products/
Request Method:GET
Status Code:200 OK (from cache)
没有请求标头或响应标头。
我在想我也许可以尝试使用 RewriteRule 在某事?28032012
的末尾添加类似的内容,但我什至不知道如何尝试。