It's a few months I have been using UrlRewriting.NET component for my Url Rewriting needs in ASP.NET 2.0. Since it's free and open source and covers many features that I need, it was a good choice for my projects. The big problem with this (and also other available components) is that it can't rewrite fake directories. For example if you have a url like http://myurl.com/products/productcategory.aspx?name=Phone and want to rewrite it to something like http://myurl.com/products/Phone/ you must have a folder named Phone in products folder containing a blank Default.aspx file inside it or in another way map all requests to ASP.NET engine in IIS. Both ways (especially second) are annoying and waste resources.

Because I'm working on a project that needs to rewrite fake URLs and also server resource management is so important in this project I searched for other solutions today and I reached UrlRewiter.NET; but unfortunately this one doesn't support fake URL rewriting as well as previous ones. [There are some tricks to handle fake directories like using customErrors default error page and etc. which you can find on CodeProject.com]. So it is not a good solution for me too. So I searched again and I reached this. It seems that IIS 7.0 new structure lets developers do this. In fact just by adding a few lines to Web.Config you can use your current module to Rewrite all URLs (See this post).

It's a good news but IIS 7.0 is still in Beta and many servers don't support it. Should we wait until Windows Server 2008 to use IIS 7.0?

It's a big question for me that while PHP developers are using this simple feature since a few years ago, why Microsoft don't offer a solution before IIS 7.0 official release.

UPDATE 1: Looking for IIS 6.0 Solutions? See this.
UPDATE 2: Wyatt Barnett has commented on this post and introduced an article written by himself which explains some tricks to make IIS 6.0 Play With UrlRewriting. See it.



 


Comments are closed.