-1

When my site redirect to with www I wrote below code in htaccess, mistakenly I forgot instead of example.com I placed example.org, it redirects to example.org now, I found my mistake and replaced with .com instead of .org, in browser I tested its redirect default to .org.

I don't know why its redirect to another site with .org. Is there any cache? How to resolve it?

RewriteCond %{HTTP_HOST} ^example.com [NC]
RewriteRule (.*) http://www.example.org/$1 [R=301,L]


 www.example.com is redirect to www.example.org
halfer
  • 18,701
  • 13
  • 79
  • 158

1 Answers1

1

see this posting:

• The simplest and best solution is to issue another 301 redirect back again.

The browser will realise it is being directed back to what it previously thought was a de-commissioned URL, and this should cause it re-fetch that URL again to confirm that the old redirect isn't still there.

Edit: some comments throw doubt upon this, see below.

• If you don't have control over the site where the previous redirect target went to, then you are outta luck. Try and beg the site owner to redirect back to you.

and also this one:

Make the user submit a post form on that url and the cached redirect is gone

How long do browsers cache HTTP 301s?

Bernhard
  • 1,745
  • 9
  • 18