简体   繁体   中英

Stop .htaccess from caching

My old .htaccess which redirected my website to 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 . If I go into incognito mode the new .htaccess works. How to I make it so the old .htaccess cache is cleared on my visitors computers.

I had a look at htaccess file somehow being cached? but I honestly don't understand this because I tried adding -MultiViews to my .htaccess.

My new .htaccess looks like this. My goal being all URL's get redirected to home page. No matter what URL you type it goes to the homepage.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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