简体   繁体   English

停止 .htaccess 缓存

[英]Stop .htaccess from caching

My old .htaccess which redirected my website to www.domain.com .我的旧.htaccess将我的网站重定向到www.domain.com However, now I want to change my .htaccess to something else (which I did), but my website still gets redirected to www.domain.com .但是,现在我想将我的.htaccess更改为其他内容(我做了),但我的网站仍然被重定向到www.domain.com If I go into incognito mode the new .htaccess works.如果我进入隐身模式,新的.htaccess可以工作了。 How to I make it so the old .htaccess cache is cleared on my visitors computers.我如何做到这一点,以便在我的访客计算机上清除旧的.htaccess缓存。

I had a look at htaccess file somehow being cached?我查看了以某种方式缓存的 htaccess 文件? but I honestly don't understand this because I tried adding -MultiViews to my .htaccess.但老实说我不明白这一点,因为我尝试将-MultiViews添加到我的 .htaccess 中。

My new .htaccess looks like this.我的新.htaccess看起来像这样。 My goal being all URL's get redirected to home page.我的目标是将所有 URL 重定向到主页。 No matter what URL you type it goes to the homepage.无论您输入什么 URL,它都会转到主页。

RewriteEngine on
RewriteCond %{REQUEST_URI} !^/index.php$
RewriteRule .*\.(php|html)$ /index.php [L,R=302]
-MultiViews
RewriteEngine On 
Redirect 301  /index.php

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM