Link to home
Start Free TrialLog in
Avatar of tia_kamakshi
tia_kamakshiFlag for United Arab Emirates

asked on

Browsers Cached Redirects


Hi,

We have an old site(xyz.com) in .net (using IIS 6), we have removed the site and redirected site to new site (abc.com) as redirect 301

Now old site (xyz.com) is re-designed and is live.

For now latest browsers has cached the 301 re-directions.

What is happening, if user is requesting for old site (xyz.com) then browser which has cached the redirection 301 is itself redirecting to new site (abc.com),
where it shold open site xyz.com not abc.com

It is happening because new browsers cache 301 redirections permanently

See blog:
http://rwec.co.uk/blog/2011/10/cached-redirects-considered-harmful/ 

If user is clearing the cache then site is opening correct.

Please help me fixing this issue. As many users browsers has cached the 301 redirects and it re-directing to site abc.com.

If you open the site xyz.com on fresh machine the website is opening as expected

Please suggest

Kind Regards,
Avatar of Swamish Naik
Swamish Naik
Flag of India image

use below tag

<META HTTP-EQUIV="Refresh" CONTENT="1; URL=add url of your website">

note that meta tag should be in head tagg only.

this may help you it contains video tutorial too,

http://ideamesh.com/knowledgebase/15/How-do-I-redirect-users-automatically-to-a-new-address.html

or try this,

http://www.pa.msu.edu/services/computing/faq/auto-redirect.html

hope it will help you, :-)
Avatar of tia_kamakshi

ASKER

Thanks for your reply,

I think I am not good explaining my question.

I donot wanted to re-direct user to any new site

so, I cannot write same site url in below meta data

<META HTTP-EQUIV="Refresh" CONTENT="1; URL=samesite">

Clients browsers has stored 301 redirect url in cache, which I wanted to clear

Initial we have site which we have redirected 301 to new site, which is now cached to users browsers permanently

Now our old site is up and now we donot wanted same redirections to happen

These days new browsers cache's the 301 redirects url and send the request to new url directly, when user request for old url.

Browsers does not validate requests and sends the request to new url from cache itself.

If we are requesting site from fresh machine it is working good but if we are requesting site from old machines where cache is not clear there only we are getting this issue

Please suggest


ohkz ,

i think you should used Django’s cache framework
full tutorial here,
https://docs.djangoproject.com/en/dev/topics/cache/

or try some plugins which are available here,

http://urbangiraffe.com/plugins/redirection/

this is another greate article about removing cache try this,
http://getluky.net/2010/12/14/301-redirects-cannot-be-undon/

tell whether this helps you or not so i can do more research on similar query ...
Thanks for your reply

From the URL:
http://getluky.net/2010/12/14/301-redirects-cannot-be-undon/

Here is the solution provided in 5 steps. But I have question on below steps. Please help me in understanding:


1.Put legacy content back.
  - Which legacy content, I need to put back
 
2.Eliminate all 301 redirects from your .htaccess / mod_rewrite config. Might as well stop causing damage first.
  - We are using windows server with IIS. Where .htaccess / mod_rewrite config file sits
 
3.Rename legacy file (perhaps append something standard), like content-123-orig.html
  - Where is this legacy file sits for example content-123-orig.html
 
4.Create new mod_rewrite rules to do 302 redirects from the original legacy URL to the new renamed URL. This will redirect all existing links from the legacy site to the old URLs, for any browsers without the cached 301 redirects, such as new visitors or users who clear caches.

- How to create mod_rewrite rules, in which file

5.Create more mod_rewrite rules that do 302 redirects from the 301 redirect targets (the “new” urls that are being moved away from). This will redirect clients that were using the new site, and also will serve the correct page for clients with a cached 301 redirect – for example, browser A cached the 301 redirect, and so when you type in /content-123.html in its address bar, it instead tries to load “/products/widgets.html”. Because of the new 302 rule, it will report that “/products/widgets.html” has been moved temporarily to “/content-123-orig.html” and the user will load the legacy page contents.



Please help me in understanding the solution

Thanks
Hey,

rewrite_mod and .htaccess are something related to apcahe server. Using IIS you don't need any of them.
Only #5 is important for you, which says adding another re-direction to the old site from new one, and that's the only way to update the cache.

Hi Rahul,

But the new site also exists, If we do so then any user will be re-directed to the new site.

Right now both sites are different and exists seperately therefore we cannot re-direct old site from new site.

Please suggest some more alteranative

Thanks
ASKER CERTIFIED SOLUTION
Avatar of Rahul Gade
Rahul Gade
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
The solution was not appropriate  for my problem, however guided me quite well!

Thanks!!