Timothy Khouri - SingingEels.com

I subscribe to the "take it apart and rebuild it" approach to learning.

URL Re-Writing The Right Way (It's Easy)!

Recently (actually about 4 hours ago) I wrote a blog post about how to fake URL re-writing in ASP.NET. In fact, I even used that method on Eels for a long time as a very lazy work around until I decided how I wanted the structure of things to work. So, after writing that post, I realized the time had come and gone for allowing sloppy code, and that now I had to fix it.

Rather than writing the same thing twice (or copying and pasting), I've posted what I should have done in the first place on Eels. You can read it here if you are interested: http://www.singingeels.com/Blogs/Nullable/2007/09/14/URL_ReWriting_The_Right_Way_Its_Easy.aspx

Comments

Jeff said:

There are many, many articles that show this solution. Although you can set reusable to true. There's no reason to create the new object every time.

# September 14, 2007 2:02 PM

Nullable said:

True, in fact I could have just used an HTTP Module... my point was to clarify my lazy approach before, and at the same time now go into too much detail about everything (meaning, writing an article).

Scott Guthrie has a great blog post (obviously) about just that: weblogs.asp.net/.../tip-trick-url-rewriting-with-asp-net.aspx

# September 14, 2007 3:22 PM

Hector said:

I've been meaning to use an approach like this for a long time. I had the idea that it was easy but didn't realize how easy it really is. Thanks for the post!

# February 25, 2008 12:04 AM