I want to perform a redirection like this:
http://www.example.com/something1
http://www.example.com/something2
http://www.example.com/something3
to
http://www.example.com/something1.aspx
http://www.example.com/folder/something2.pdf
http://www.example.com/something3.aspx?id=10
and still show the original URL in the browser (under the hood redirect)
The environment is IIS 6 / Asp.Net 3.5 on Windows Server 2003 SP2
How would I do this using web.config or IIS.
I know how to handle redirects if I can map an extension to the aspnet_isapi.dll and use Context.RewritePath(string) but I don’t know how to do that for URLs that don’t have extensions.
If you are able to move to ASP.NET 4 then there is a lot more support for extentionless URL rewriting.
However, if you have to use ASP.NET 3.5/IIS6 you can use ScottGu’s blog post here:
http://weblogs.asp.net/scottgu/archive/2007/02/26/tip-trick-url-rewriting-with-asp-net.aspx