views:

35

answers:

2

I'm using Apache Mod RewriteRule to deal with dynamic URLs. And trying to figure out the best URL structure to go with.

Here are the options I am thinking about:

They will all rewrite to: mydomain.com/myprogram.php?username=$1&cat=$2&item=$3

Option 1: mydomain.com/username-category-item-5.html

Option 2: mydomain.com/username/category-item-5.html

Option 3: mydomain.com/username/category/item-5.html

My concern is with how the search engines will crawl and index the pages. If I use option 1 all users files will appear to be in the same directory. Will this make the search engines index only a limited number of the pages?

And if I go with option 2 or 3 what is a safe number of sub directories to use when optimizing for search engines?

+2  A: 

Go with the last. It's clearer all around, not even counting what search engines think of it.

Dav on a Plane
A: 

May I suggest you simply use:

http://mydomain.com/username/category/item

Ensure that all of your links are "Reachable". I was recently involved in a site with this type of structure. The problem was, the Search Engines did not know about all of the links. So we added a page per user, which linked to each category page, which listed links to all the items.

Traffic doubled within 3 months.

gahooa