< 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
Google Chrome - First thoughts for SEO
Thu, 4 Sep 2008 12:20:35 by Emily Mace
Google Launch new browser
Tue, 2 Sep 2008 08:58:55 by Emily Mace
Splash pages really are dead...
Thu, 28 Aug 2008 16:30:38 by Kerry Dye
Checking Localised Search Engine Rankings from Elsewhere
Thu, 21 Aug 2008 10:24:01 by Matt Hopkins
3 reasons your website might not be ranking
Mon, 18 Aug 2008 11:30:27 by Emily Mace
Google focuses on 404 error pages for SEO
Wed, 13 Aug 2008 11:53:32 by Emily Mace
Monitoring New Incoming Links to Your Site
Mon, 11 Aug 2008 13:53:37 by Kerry Dye