Beautiful URL:s with ASP.NET (we're not there yet)

Some time ago I wrote about how to do URL rewrite with ASP.NET (and about the problems that are involved). Many developers has tried to tackle the problem and I will not go to ddep into the technical stuff this time. I will how ever save a few new links I found on the subject.

First an article that isn't related to ASP.NET but shows how well-designed urls should look like.

Then an link to an Wiki completely dedicated to well designed urls, where you can read "ASP.NET - Well Designed Urls Wiki".

My conclusion is that it's probably smartest to wait until IIS 7 is released. Unfortunatly it doen't seems like we will get this web server for Windows 2003. We will probably have to wait for the new Longhorn server.

IIS 7.0 will have much better support for URL-rewrite as you can read on Scott Guthrie's blog:

Several people have asked why the built-in URL Mapper in ASP.NET 2.0 doesn't support regular expressions. There were actually a few reasons for this -- one of the big ones being that just about the time we were about to consider adding it my team started also working on IIS7. We realized that a full-featured version would want/need to take advantage of some of the new features in IIS7 as well as the support all content types (in particular -- images and directories). So we postponed making it feature rich until a future version.

I am rather happy that I havn't started to try to rewrite URLs with IIS 6 yet, especially when I read reports as "Making URL rewriting on IIS 7 work like IIS 6".

The question is if one really can wait. To have nicely formatted URLs is really tempting, especially from an SEO-perspective. But if you are going to use one of this tecniques just bear in mind that you might have to redo everything once IIS 7 is released.

If you want to have some thought from someone who has started using URL-rewrite with IIS 7 on Vista, you can read Dennis blog.

By Jesper Lind

How to do URL-rewrite with ASP.NET?

To have the .aspx-prefix at the end and a lot of querystring parameters at the end of the URLs feels rather ungraceful. And it's not any good from a SEO-point of view. IIS 6 and ASP.NET has not got any good built in solution to do URL rewrite. But there are some solutions and I will collect a few links here that I read on the subject.

In Ruby on Rails URL-rewrite seems simple and is a natural part of the language. On Apache servers there are the mod_rewrite module which is great for all the PHP-developers.

With ASP.NET it's possible to use HttpContext.RewritePatt, but it's not as simple as it first appears. I found a lot of articles about soultiuons but many of them described problems with cacheing, themes and problems with Postback.

On there's an open source component that claimes to have solved a lot of these problems. I have not tried this myself though.

I have also read about the coming IIS 7.0 and that there will be a better support for URL rewrite. Lets hope so!

Some mixed references


By Jesper Lind