< Back to Blog

URL Rewriting: Part Two: How?
Fri, 26 Oct 2007 14:15:24 by Joe Bursell

In "URL Rewriting: Part One: Why?" I talked about dynamic URLs and their limitations. Here I'll describe the ways in which they can be modified for search engine friendliness (and other benefits).

Simply put, a dynamic URL is a locator that contains a variable element (that's the bit that makes it "dynamic", usually a call to a database) e.g. http://www.example-site.com/cgi-bin/gen.pl?id=154&view=basic ...in this instance it's the query-string beginning "id=XXX".

When a search engine interrogates this URL it'll strip the noise out, and by noise I mean everything after the "?". The result is that instead of seeing many distinct URLs such as
http://www.example-site.com/cgi-bin/gen.pl?id=466&view=
http://www.example-site.com/cgi-bin/gen.pl?id=467&view=
etc. the search engine will just see loads of duplicates:
http://www.example-site.com/cgi-bin/gen.pl
http://www.example-site.com/cgi-bin/gen.pl
etc. which will be ignored. The outcome is that only one URL is recognised, and it's not descriptive enough to provide search information, so your many, many products won't get the visibility you desire.

By rewriting the URL you apply some rules to translate the indecipherable portions and clear out the noise, making the URL easily readable. Of course your site still generates dynamic locators, its just that they are squirted into a manageable/readable format. The search engines can now read them, there's no dupes, and Mr. Hacker will have difficulty telling the difference.

The tools available for URL rewriting vary from platform to platform, the most popular being ISAPI_Rewrite, and IIRF (free, from http://www.codeplex.com/IIRF) for Windows IIS and mod_rewrite for Apache (Linux).

These rule based rewrite SAPIs (Server Application Programming Interfaces) operate in a similar way on both systems as ISAPI_Rewrite is based on Apache's mod_rewrite. The rules they are based on come from regular expressions- the ability to search and manipulate text based on patterns- so require some coding knowledge.

For those of you that want to dig deeper into mod_rewrite have a look at http://www.ecauldron.com/web/design020.php, this is a good commentary that will give you enough information to get rewriting in no time.

If ISAPI_Rewrite is your bag visit its forum (http://www.helicontech.com/forum/forum_topics-FID-2.htm). Alternatively, have a look at IIRF's forum at http://www.codeplex.com/IIRF/Thread/List.aspx.



Joe Bursell
Campaign Delivery Manager


Subscribe

Archives

Related Blogs
Web Analytics - New Yahoo Analytics and Google Analytics update
Thu, 9 Oct 2008 09:41:33 by Emily Mace
Combating the Google Gravity Rankings Drop
Tue, 7 Oct 2008 14:01:39 by Kerry Dye
Friday Fun - Make Google Talk Like The Swedish Chef
Fri, 3 Oct 2008 09:11:59 by Emily Mace
Search Engine Optimisation - Things to Avoid
Thu, 2 Oct 2008 09:11:23 by Emily Mace
Improving Offline Conversions with your PPC Campaigns
Wed, 1 Oct 2008 17:37:04 by Matt Hopkins
Google Search Interface Changes
Wed, 1 Oct 2008 16:05:56 by Kerry Dye
Search Engine Optimisation in Google from 2001
Wed, 1 Oct 2008 14:11:07 by Pete Handley