Possible Duplicate:
debating between different kinds of URL and see if one is more seo-friendly than other…

Our SEO advisors are claiming that having our URLs in the form:


leads to better ranking in the search engines, etc., but I'm not sure if that's true/valid.

Do others use this practice in their own websites?

The simpler alternative for us would be to do something like:

  • This is not quite programming related.
    – Gumbo
    Oct 21 '10 at 12:45

Yes, your SEO advisors are correct. You can actually use the Apache Rewrite module to translate that SEO-friendly URL into the alternative you would prefer. By changing the desired URL structure to www.example.com/categories/category/subcategory/, you can do this in your .htaccess file:

RewriteRule ^categories/([^/]+)/([^/]+) showcat.php?cat=$1-$2

Basically when Apache receives the request with the SEO-friendly URL, it matches that line and calls the PHP file using the structure you prefer, automagically inserting the category names.

Almost every PHP CMS with SEO-friendly URLs uses mod_rewrite in some capacity.

Here's a helpful guide to get you started: http://www.addedbytes.com/for-beginners/url-rewriting-for-beginners/

  • For more info about mod_rewrite, Google it or check out the links on the right under "Related" :) Oct 21 '10 at 12:50