From the log you posted, it seems you put rule in web.config in SiteB folder? Please try put the rule in web.config of site www.website.com root folder.
Let me know if this help address the issue, thanks.
Marked as answer by Lloydz on May 21, 2012 06:36 AM
My rewrite redirector has just stopped working. I have checked through everything we had previously discussed and have redeployed most of the sites etc and I can't get it to work.
Currently when I put a redirect rule on the "Default web site" exactly as it was when I got it working (I took a screen shot of the working setup), when you navigate to any other sites under (.*)www.website.com(.*) it fails with a generic page cannot be
found.
I can't see what is wrong, what should you generally have in your default web site's web.config?
The rewrite stopped working after I redeployed my application, I also did a little tidying up, getting rid of unwanted old files and duplicate sites that were there from testing.
When I apply the rule fresh (i.e. I go through the configs and check there are no rewrite rules present, deleting them if there are) I get the same thing, in that I cannot navigate to any of the websites at all.
Lloydz
2335 Posts
Microsoft
Re: Redirect if referer is not X using URL Rewrite?
May 17, 2012 02:31 AM|LINK
Seems pattern not match is the root cause:
Pattern
siteB(.*)
Input
WebResource.axd
Negate
false
Matched
false
From the log you posted, it seems you put rule in web.config in SiteB folder? Please try put the rule in web.config of site www.website.com root folder.
Let me know if this help address the issue, thanks.
mcinnes01
9 Posts
Re: Redirect if referer is not X using URL Rewrite?
May 22, 2012 08:10 AM|LINK
Hi Thanks,
I think this was the issue, my sites are all under default site in IIS, hence applying the rule globally to the default site worked.
Thanks for all your help,
Andy
mcinnes01
9 Posts
Re: Redirect if referer is not X using URL Rewrite?
Jun 06, 2012 10:42 AM|LINK
Hi,
My rewrite redirector has just stopped working. I have checked through everything we had previously discussed and have redeployed most of the sites etc and I can't get it to work.
Currently when I put a redirect rule on the "Default web site" exactly as it was when I got it working (I took a screen shot of the working setup), when you navigate to any other sites under (.*)www.website.com(.*) it fails with a generic page cannot be found.
I can't see what is wrong, what should you generally have in your default web site's web.config?
The rewrite stopped working after I redeployed my application, I also did a little tidying up, getting rid of unwanted old files and duplicate sites that were there from testing.
When I apply the rule fresh (i.e. I go through the configs and check there are no rewrite rules present, deleting them if there are) I get the same thing, in that I cannot navigate to any of the websites at all.
Here is an error trace I did, I don't understand what the "REWRITE_DISABLED_KERNEL_CACHE Warning" is all about?
7. -URL_REWRITE_START
RequestURL
/siteB/Interface/Login.aspx
Scope
1
Type
0
Scope
Distributed
Type
Inbound
Warning8. -REWRITE_DISABLED_KERNEL_CACHE
Informational9. -REDIRECT_FROM_CACHE_ACTION
CachedRedirectedURL
http://www.website.com/siteA
RedirectType
301
RedirectType
Permanent
0 ms
Informational10. -URL_REWRITE_END
RequestURL
http://www.website.com/siteA
Any ideas what I have done, I can provide any details you may need if you tell me what you want.
Cheers,
Andy