Optimising Dynamic Pages Using Mod_rewrite

|
A lot of personal and business websites are now database driven and use a combination of technologies to store and produce content. Although new technology can bring its advantages you need to be aware of the possible effects on your SEO campaign.
This site, for example, uses PHP with MySQL. If I turned off the mod_rewrite options the pages would display in a very different manner. Instead of getting: http://www.searchenginecookbook.com/seo/proper-english-improves-results You would get: http://www.searchenginecookbook.com/seo/index.php?p=5 Which one is more search engine friendly? The first URL of course. Why? Just look at it. The URL (link) contains semantic content about what the page contains, so both a reader and search engine can extract more meaning than they could from a query string (p=X). In the case of Wordpress this is done by defining how static pages are generated and then using Apache's mod_rewrite module to generate a set of rules. As an end user of the software you do not need to concern yourself with the actual syntax used by mod_rewrite. Other software has similar options available, so if you are using Phpbb you can choose from a number of hacks to make it more "friendly" (see webmedic or Able2know for some examples) So how can you learn how to use mod_rewrite? If you are feeling really lazy try this cool seo tool which can get you started. If you would like to really learn about the basic of URL rewriting then you should read the mod_rewrite cheat sheet which is a handy reference for those of you who want to learn how to do it. To really take advantage of URL rewriting you need to know how to handle regular expressions. Voodoo? Possibly, but there are many excellent books on the market that can demystify the process for you. One I would recommend is Mastering Regular Expressions which takes you from the basics through to the more complex.

About this Entry

This page contains a single entry by Michele Neylon published on July 28, 2005 11:20 PM.

The Dark Side - The other side of SEO was the previous entry in this blog.

Search Engine Spiders - The first week is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

Powered by Movable Type 4.1