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

Categories

I'm trying to debug an .htaccess file. FireFox keeps caching redirects and I can't get around them. Normally I would hit Ctrl + F5, but because it has already redirected me to another page, that just refreshes the page I was sent to and not the url I typed in. Is there a way to force a refresh of a url?

Here's an example:

  • Redirect example.com/hi to example.com/hello, test in FireFox and it works
  • Remove this line from .htaccess
  • Type example.com/hi in FireFox, it still redirects to example.com/hello
  • Type example.com/hi in Chrome, it does not redirect

This is why I think it's a browser caching issue, not server caching.

Edit: This seems to be FireFox specific, a quick solution is to use Chrome instead. The cache expired after an hour, which is way too long when trying to debug.

See Question&Answers more detail:os

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

1 Answer

If you're using RewriteRule, just use R instead of R=301. For other purposes, you'll have to clear your browser cache whenever you change a redirect. (If you don't know how to clear your browser cache, googling for a how-to should provide a quick and easy answer - or feel free to comment and I'll help you out.)

Simply put, try to avoid 301s wherever possible until you've got your redirects working normally. If you can't avoid them, get ready to clear your browser cache regularly.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...