Posted by
imarichardson in
Programming & Development on
12 17th, 2005 |
View Comments
Anyone who has got caught up in the perpetual debate over IIS vs. Apache (they’re Web Servers) will know that one of the biggest differences between the two revolve around the "mod_rewrite" capabilities Apache allows that IIS doesn’t. So the Apache folks actually win the battle on this one. And, honestly, it’s actually something I believe should be native to IIS … but ain’t1.
What is mod_rewrite? Well, let’s just say what it does using this example of a common URL — "http://somesite.com/somepage.ext?cat=12131231&id=MRpsi213-132…(And then I’ll give you some options for non-Apache servers)
- URLs should just look good:
I really believe in aesthetic, professional appeal. Yes, these things reside in the eyes of the beholder, but you cannot argue that a URL without crazy characters looks cleaner and (for me at least) make a site look like the developer actually took some time to add an extra level of "something-ness" to the site/application. For the general web user, it’s just plain easier to remember a small, human readable link. That, my friend is why the world LIKES TinyURL.
- Search engine friendly URLs:
It’s just plain truth: search engines will not index dynamically generated links. It’s like when you’re driving down the road and all of a sudden you see a massive line of traffic halted before you. So inside of 200 feet you screech over three lanes of traffic to get to the exit even if it means completely turning around in the opposite direction. Well, search engines do the same thing when it comes to that question mark. mod_rewrite lets you do something pretty like "http://somesite.com/somepage/shoes/boboes". On the contrary, search engines love links like this and google can now archive your completely dynamic site as if it were all static.
- Underlying Technology:
It’s pretty obvious to figure out what server technology something is simply by looking at the ".ext" extension in the URL. By using mod_rewrite, people can’t just look and "see" immediately what type of app server you’re using. Maybe the average person browsing the web doesn’t care, but geeks do– and when geeks care they get really, really sneaky and do mean things.
- Security and more:
For the heavy hitters, you can add an additional level of security by restricting based on user agent (to block naughty crawlers that don’t obey search engine robot files) and applying rules for what files/types can be accessed through the URL string without killing your app/site. You can also add indexing by date and provide ban/authorization dependent upon IP.
And so, if you’re like me and actually use IIS, you realize that this incredibly beautiful experience is missing by default. (Yea, yea, sure it may come in the next IIS, but that ain’t, ugh, *isn’t* coming out anytime soon.) Don’t fret, though; here are some choices for you to sift through, some free, some not:
- Mod_Rewrite, iismods (FREE):
Yea- it’s free, nonetheless they’ve good documentation and instructions that explain the install process. Site seems pretty solid, too.
- URL Rewrite filter, tuckey.org (FREE J2EE Servers only):
Free, too but for J2EE servers only. There’s a group and documentation, here, too.
- Ionic’s Rewriting Filter, Ionic Shade (FREE – ASP only):
The download.com page looks better than the actual site.
It’s also only going to work for file types handled by ASP.Net; anything else, static or dynamic, works about as good as a discharged solar powered flashlight in the dark.
- URL Rewrite, smalig.com ($28.34):
The $28.34 is a conversion from € to $. Site is a little on the bummed side, but there is an FAQ and customer service link. You get instructions and the download after you purchase.
- ISAPI Rewrite, Helicon Tech (Lite is FREE; Pro. is $69):
Honestly, this one looks like it’s the most professional. Lots of documentation, a real installer (we don’t want no stinking manual config), known issues, release history, discussion forums, feature history, registration/serial number… I’m impressed. The Lite version is free but with limited functionality compared to pro.
- URLRewriter.Net, URLRewriter.Net ($99):
They’s running a December promotion for $50 off (so it’s $49). Site looks as professional as ISAPI Rewrite. Only limitation is that the requirements page lists Visual Studion.Net 2003 or greater in order to use extension. Oh, bother.
- IISRewrite from QuerkSoft ($99):
They’re doing that thing where they say it’s $199 but "for a limited time" it’s $99 … cute. There’s a big blurb about this product being featured in MSDN Magazine in 2002 … but that was like in, ugh, 2002, but hey it’s an option, too.
Don’t say ain’t, your mother will faint, your father will fall into a bucket of paint, your dog will die, your sister will cry, your brother will call the FBI: learned from my 8 year old sisters some time ago.