Rewriting URL paths in ASP.NET 2.0 is referred to as URL Mapping. Instead of putting some code in your Application_BeginRequest method, you can now just put a few lines in your Web.Config file and like magic you can rewrite those URL paths with ease.
With URL Mapping you can turn a not so freindly URL like ~/Blog/Post/11/12/2005/145.aspx into ~/TheCoolestPost.aspx
Example Web.Config File:
Since the Web.Config file is an XML document, you could add functionality to the admin section of your app to add/edit/delete custom URL Mappings. This is definately something I'm going to keep in mind for future ASP.NET 2.0 app I design/build.
kudos to the ASP.NET team. This is just one of the many new features added to ASP.NET 2.0. And they couldn't have made it any easier to use!
URL Mapping in ASP.NET 2.0: http://beta.asp.net/QUICKSTART/aspnet/doc/navigation/urlmapping.aspx
If you want to see how to rewrite url paths with ASP.NET 1.x go here: http://edsid.com/blog/articles/160.aspx
This blog post is licensed under the Creative Commons Attribution 3.0 United States License, unless explicitly stated otherwise within the blog post content. All other content on this website is not licensed under Creative Commons licensing.