0
votes

I have an ASP.NET 3.5 application that started in 1.1 and has been ported from IIS5 to IIS6 and now we're going to IIS7. Back in the 1.1 days we implemented URL-rewriting functionality based on HTTP Modules that still works great - fairly complex logic that is very stable. It allows us to take URL's like this

www.abc.com/merchant

and figure out that 'abc' represents a brand of products and 'merchant' is one of many companies that sell that brand. So far so good.

Along the way we have had some merchants close, others merge, etc. To preserve the URL's for them, we will sometimes use IIS6's virtual-directory-redirection capability to redirect www.abc.com/oldMerchant to www.abc.com/newMerchant, or to something else entirely, like www.micorsoft.com - who knows. There are about a dozen of these now.

I am trying to do the same in IIS7 and I've found many posts describing differnet mechanisms (like this). The biggest problem I have is that in IIS7 the virtual root paths STILL go thru my URL rewrite logic, while they didn't in IIS6. That is, instead of redirecting www.abc.com/oldMerchant to www.abc.com/newMerchant, the URL rewriting sees it first and concludes that oldMerchant isn't a valid merchant (as it should).

Before I go down a coding road to solve this problem, does someone know of a magical switch I've missed?

2
yes, we have the same problem and we have fixed it. you need to show your web.config code/setting to point the issue - Muhammad Akhtar
have u implement URL-Rewriting with the help of urlrewriting.net/149/en/home.html - Muhammad Akhtar

2 Answers

0
votes

my eyes are rolling back in my head.

That is, instead of redirecting www.abc.com/oldMerchant to www.abc.com/newMerchant, the URL rewriting sees it first and concludes that oldMerchant isn't a valid merchant (as it should).

So, in your rewrite logic, can you not include appropriate redirect rules for the sites you want to redirect? (I'm assuming a redirect is possible in the IIS7 Rewrite Module).

0
votes

Are you running IIS7 in integrated or classic mode? I expect you are running in integrated mode. That's the new mode that sends all of the traffic through the .Net pipeline. If you switch to classic mode, I think it might start working for you again.