Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.0k views
in Technique[技术] by (71.8m points)

apache - htaccess file somehow being cached?

I had a .htaccess file doing a very simple rewrite of the page names. This is the contents of the file:

Options +FollowSymlinks
RewriteEngine on
RewriteRule setup setup.php [NC]

I now want to stop rewriting setup to setup.php - how do I do this? I've tried removing the line from the file, I've tried deleting the file and restarting apache, and it is still rewriting setup to setup.php. How do I make it stop? It seems to be completely ignoring any other .htaccess file I create, and there's nothing being written to the error log. Is it caching the file somewhere? How do I stop it?

I'm using apache2 on ubuntu.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

If you are having problems with the htaccess file not updating due to the redirect getting cached in your browser. You can use a webkit browser like Google Chrome or Safari to open a private browsing session or Incognito Window.

Every time you update the htaccess file, you will need to close all incognito windows/tabs and then open a new one. The incognito window will not write to the cache beyond the current session and will not use the existing cache on initial load. It makes a great way to bypass caching issues when testing, and a great way to see if the issue you are having is caused by your browser's cache.

I am not sure, but Firefox and newer versions of IE might have a similar feature.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

57.0k users

...