Redirecting *working* URLs doesn't work - Bug?

Topics: Developer Forum, User Forum
Jan 30, 2012 at 5:27 PM
Edited Jan 30, 2012 at 5:44 PM

I am having problem with using RedirectRules on URL's that actually work before a redirect. Can anyone lend advice?

WHAT DOES WORK (non-working before rewrite URL's)

If you go to before a rewrite, it would give you 404 because the directory does not exist.

Then after implementing a RedirectRule --

RedirectRule ^/foobar$ [R=301]

-- It works fine

WHAT DOESN’T WORK (working before rewrite URL's)

I have an old page that should map to a new page: (this is a REAL page)

RedirectRule ^/TWKB/kbase_usa\.html$ [R=301]

I have tried placing this at the beginning of the ini file, the end, nothing seems to work for redirects if the incoming request is for a real existing page.  I have tried implementing this on both HTML and ASP pages, both unsuccessfully.

I don’t seem to be alone - maybe this is a bug?

Feb 10, 2012 at 12:06 AM

No - with the information you provided, there is no evidence of a bug in IIRF. I think it is more likely to be a cache issue.  In other words, it's possible your request is being satisfied before it ever reaches IIS and IIRF.

There are multiple levels of cache involved.  The web browser itself has a cache; some requests will be satisfied from the local disk-based cache.  Servers  that lie between the web browser and the eventual server also can maintain caches. Often proxy servers maintain caches and fulfill requests from those caches. Finally, Windows Server itself maintains a web cache, and may satisfy the request before IIS receives it.

To further understand and diagnose the behavior you are observing, you should:

  • attach a debugging HTTP proxy, like Fiddler2, to your browser. Examine the request/response.
  • modify the URL to add meaningless query params that will cause the caches to be bypassed.   Appending ?_mumble=froop would be sufficient.
  • Check the IIS and IIRF logs to see what these pieces are doing, if they are explicitly handling a request.

good luck