URL Rewriting in ASP.Net

By Deane Barker on September 25, 2008

The more I work with ASP.Net, the more I’m coming to realize that I sold it short. I used to think it was provincial because it didn’t offer URL rewriting like Apache.

I was so wrong. Even better than Apache, perhaps, there are multiple ways to effect this, some simple, some crazy-powerful. Options and their costs.

  • At the most basic level, you can wildcard the .Net engine to all extensions and use an HttpHandler. This is rock-simple to do. Built-in to .Net.

  • ISAPIRewrite is essentially mod_rewrite for IIS. It works the same way, and has the same syntax. This rewrites URLs long before they even hit the .Net pipeline. $99.

  • UrlRewriter.Net is a standard HttpModule for IIS that will essentially do the same thing from within IIS and .Net. Open-source.

  • Themelia looks powerful beyond belief. It lets you hijack the entire request pipeline and do bizarre and arcane things at any step. Open-source.

I like ASP.Net a little more every day.

Gadgetopia

Comments

  1. You asked about being a hypocrite about your stance on twitter. I think this is an even bigger flip-flop. Some elements of this post remind me of my post from 2006 which originated from an email from you. Glad to see you are coming around!

Comments are closed. If you have something you really want to say, email editors@gadgetopia.com and we‘ll get it added for you.