HOME  |  AJAX  |  SOLUTIONS  |  TECHNOLOGIES  |  E-COMMERCE  |  ABOUT US
URL Rewrite
What is URL Rewrite (mod_rewrite)?
mod_rewrite is a very popular Apache Webserver extension that allows you to change the values of your URLs when the are recieved at the server.  What does this do for you?  It allows you to make your dynamically generated pages look like static pages.  What good is that?  It makes your sites easier to crawl and index by the search engines on top of being easier for your users to remeber.

Mod_Rewrite For IIS?
I haven't been using mod_rewrite in my sites since it is an Apache only module, but I have recently run across some versions that have been written for Windows Internet Information Services (IIS).  One of the nice free ones, and probably the one that I'll end up using is URL Rewrite. It appears that URL Rewrite has recently been released as free software, making it ideal for those of you interested, but not willing to spend any money.  I have experimented with it just a litte bit, and from what I can tell, it's a nice piece of code.  It plugs into your IIS just like anyother ISAPI filter would.  Then you just pass it a Regular Expression substitution rule for how you would like your URLs to be rewritten, and ta-da you have dynamically re-written URLs.

This will take some upfront design on your webpages to make the URLs come out correctly in the website, but with a little planning, this shouldn't be too difficult.

URL Rewriting with ASP.NET
You can create your own little URL rewriting engine in ASP.NET using custom HTTPHandlers.  This is something that I'm new at, but provides a good means of creating a packaged up website that takes advantage or URL rewrites.  The MSDN Provides a good article for getting started with rewriting URLs in ASP.NET.

ASP.NET 2.0 has added the ability to map URLs in the web.config file, but Microsoft really dropped the ball here because you can't use regular expressions, making this functionality essentially useless.  Hopefully they will remedy this in the next version, but that could be a long time from now.

Actually, I have since realized the reason that URL Rewriting wasn't correctly implemented in ASP.NET 2.0 is because the new IIS 7.0 will have a full featured URL rewriting mechanisim.  I personally think if Microsoft wasn't going to implement URL rewriting correctly with ASP.NET 2.0, they shouldn't have done anything at all.  The way that it is implemented in ASP.NET 2.0 makes me feel like Microsoft just doesn't get the point of URL rewrites at all.

Here is a nice little article about URL rewriting in ASP.NET with a very simple HTTP Module with support for Regular Expresssions