IIS URL Rewriting for all Inbound URLs?

Posted by Rob Burke on Stack Overflow See other posts from Stack Overflow or by Rob Burke
Published on 2010-04-01T09:01:20Z Indexed on 2010/04/01 9:03 UTC
Read the original article Hit count: 504

Hopefully a simple question although one I have found impossible to answer myself using the Googles!

I have a website on IIS with the URL http://www.contoso.com/ which points to C:\www\public\

There has been a forced directory restructure so now all of the data (Default.aspx, Product.aspx, etc.) that originally resided in C:\www\public\ now resides in C:\www\public\en\ie\ - however, the IIS website document root is still C:\www\public\

So, essentially, I have a lot of inbound links to http://www.contoso.com/Product.aspx?id=1 (etc.) which are now returning 404 errors - the correct link is now http://www.contoso.com/en/ie/Product.aspx?id=1

Please consider that I can make no changes to the directory structure or the IIS document root... so must solve this issue using URL rewriting.

Is it possible to capture all requests to contoso.com/* and rewrite them to contoso.com/en/ie/* ??

© Stack Overflow or respective owner

Related posts about iis

Related posts about administration