I am getting ready to implement some url rewriting in my ASP.NET 2.0 project and at first I was excited that it was actually baked right into the framework in 2.0. Then I found out that the implementation was completely crippled and useless for 95% of real-world cases.
Here is an example UrlMappings config section for 2.0, notice what is missing?
<urlMappings enabled="true">
<add
url="~/TodaysNews.aspx"
mappedUrl="~/news.aspx?category=todays" />
<add
url="~/TechNews.aspx"
mappedUrl="~/news.aspx?category=tech" />
</urlMappings>
Thats nice and all, but what happens when you have a dynamic ID like an order number… say you wanted this url: orders.aspx?ID=12 to map to something like Orders/12.asps. As far as I can tell it’s not possible. I can’t think of very many people would want to hard code all their URL mappings, it doesn’t even seem to make sense for simple scenarios like this.
Back to my favorite 1.1 solution I guess.
