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 Urlrewriting.net 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
http://weblogs.asp.net/fmarguerie/archive/2004/11/18/265719.aspx http://www.aspnetpro.com/NewsletterArticle/2003/09/asp200309pj_l/asp200309pj_l.asp. http://www.developersdex.com/gurus/articles/793.asp?Page=3 http://www.webforum.nu/showthread.php?t=145530. http://www.raftweb.info/SEO/1032.aspx
Comments
Code Odyssey » Vackra URL:er med ASP.NET (en bit kvar) Wrote:
25:e Januari 2007