简体   繁体   中英

mod_rewrite - Does Apache caches .htaccess rules? (still follow rules even after deleting the .htaccess file)

I was doing some tests with mod_rewrite in my wamp environment.

I tested a simple rule that I put at the root of one of my websites and asked it to redirect any request ending with index.php to localhost (there is no sense to it, just wanted to check the rule)

It worked, but after, any change I'd made to my .htaccess file rule was not reflected. After a while I just decided to delete the .htaccess... well it's still doing redirection! I just don't understand it. Does Apache cache the rules or something (restarting services trough wamp menu didn't change anything)

(Don't ask for the exact rule I used, since I deleted the file, I don't think it's relevant anyway)

.htaccess files are processed each time a request comes through . It is possible that your browser cached the request being forwarded. Did you try it with httpfox or anything to see what the headers said?

您是否尝试删除浏览器缓存?

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