Hello, We created a redirect rule in IIS using URL rewrite module, and it works nicely. But when we disable/delete this rule, it stops working (as expected) in other browsers but continues to work in IE (our version is 9). We did some testing and narrowed down
the problem to when HTTP code 301 - Permanent Redirect is used. This translates to redirectType="Permanent" in web.config. If this is set to Found (302) or Temporary (307), before being set to Permanent (301), and then disabled/deleted, IE (like the other
browsers) shows a 404 Not Found error, as expected. That seems like a bug in Windows/IE's HTTP handler module. Could someone look into this or share some insight about this issue? Needless to say, we had already tried clearing IE cache before figuring out
what was causing the problem. Thanks!
Well, IIS/URL Rewrite seems to be working fine, since other browsers get proper HTTP responses and work as expected. The problem seems to be with IE. Once IE receives a 301 permanent redirect, it seems to cache the redirect permanently in the literal sense!
If I change the rule in ANY way after IE has received the first 301 from the web server (for a short-URL redirect for example), it seems that IE isn't even bothering making an HTTP Request to the server, even after restarting Windows!! I verified this with
Fiddler - while FF/Chrome get the respective 302, 307, 404, or updated 301 codes first before the HTTP 200 for the redirect destination, IE just skips the first part and gets the 200 directly! Hmmmm........ :-\
"If I change the rule in ANY way after IE has received the first 301 from the web server (for a short-URL redirect for example), it seems that IE isn't even bothering making an HTTP Request to the server, even after restarting Windows!!"
So IIS is not returning a 301 in the logs and even no request get there at all?!
If that is the case this seems to be a IE problem not an IIS one.
Right...just what I said in my post. Is there an official forum like this one or bug reporting for IE? If so, could you please point me in that direction? Thanks!
The last reply on that thread links to an
article which states that IE9 will cache a 301 redirect "unless there are headers which forbid it (e.g.
Cache-Control: no-cache)". So, that brings us back to IIS. How do I issue a 301 redirect with a Cache-Control: no-cache header using the IIS URL Rewrite module?
sunnysheth
4 Posts
IE HTTP 301 Permanent Redirect bug??
May 19, 2011 07:33 PM|LINK
Redirect http url rewrite Module 2.0 permanent redirect IIS 7.5 307 301 IE 302 temporary found
Rovastar
3321 Posts
MVP
Moderator
Re: IE HTTP 301 Permanent Redirect bug??
May 19, 2011 08:40 PM|LINK
sunnysheth
4 Posts
Re: IE HTTP 301 Permanent Redirect bug??
May 19, 2011 10:27 PM|LINK
Rovastar
3321 Posts
MVP
Moderator
Re: IE HTTP 301 Permanent Redirect bug??
May 19, 2011 11:21 PM|LINK
"If I change the rule in ANY way after IE has received the first 301 from the web server (for a short-URL redirect for example), it seems that IE isn't even bothering making an HTTP Request to the server, even after restarting Windows!!"
So IIS is not returning a 301 in the logs and even no request get there at all?!
If that is the case this seems to be a IE problem not an IIS one.
sunnysheth
4 Posts
Re: IE HTTP 301 Permanent Redirect bug??
May 19, 2011 11:57 PM|LINK
HCamper
8048 Posts
Re: IE HTTP 301 Permanent Redirect bug??
May 20, 2011 02:22 AM|LINK
Hello,
Since you asked the IE Forum http://answers.microsoft.com/en-us/ie/forum .
The Microsoft Connect site is location for Bug Reporting http://connect.microsoft.com/directory/internet/ ,
Martin
Community Member Award 2011
sunnysheth
4 Posts
Re: IE HTTP 301 Permanent Redirect bug??
May 20, 2011 09:25 PM|LINK
gilly3
1 Post
Re: IE HTTP 301 Permanent Redirect bug??
Jul 17, 2012 11:18 PM|LINK
The last reply on that thread links to an article which states that IE9 will cache a 301 redirect "unless there are headers which forbid it (e.g. Cache-Control: no-cache)". So, that brings us back to IIS. How do I issue a 301 redirect with a Cache-Control: no-cache header using the IIS URL Rewrite module?