Thursday, February 11, 2010

URL Rewriting

As mentioned in my previous post, Regex Storm now has URL rewriting. It's nice to have simpler URLs. It's only used on 3 pages right now, but I expect to get a lot of mileage out of it as I keep building up the site. And then there's the SEO bonus, of course. More concise, more readable URLs tend to get better treatment with search engines.

My initial approach to implementing the URL rewriting was very tedious. Lots of code in Global.asax Application_BeginRequest() to manually pick apart the URI. I've done it this way before, but I don't recommend it. Too many little issues pop up as you go down this path.

I ended up going with the IIS URL Rewrite Module. Very easy, very systematic, and overall it just behaves better.

The reason I didn't do it this way at first was because I wasn't using IIS in my development environment. I finally sucked it up and got IIS running on my local box. So now my development and production environments are more similar, I can use (and test) modules locally, and my development environment is more robust. All good things.

Labels:

1 Comments:

At September 14, 2012 at 1:19 AM , Blogger Unknown said...

Thanks a lot for the regex tester. I use it a lot. Very useful during development :)

 

Post a Comment

Subscribe to Post Comments [Atom]

<< Home