Webmasters Stack Exchange is a question and answer site for pro webmasters. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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:

share|improve this question

migrated from stackoverflow.com Oct 21 '10 at 12:45

This question came from our site for professional and enthusiast programmers.

marked as duplicate by John Conde, JasonBirch Oct 21 '10 at 15:28

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

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/

share|improve this answer
For more info about mod_rewrite, Google it or check out the links on the right under "Related" :) – Colin O'Dell Oct 21 '10 at 12:50