PDA

View Full Version : URL rewriting - best practices



dvduval
06-10-2005, 07:37 AM
Let's suppose we have a script that is generating some code like this:
somesite.com/item.php?c=4&sc=15&id=47
"c" is the category, and let's presume category #4 is "widgets"
"sc" is sub-category, and let's presume #15 is "accessories"
"id" is the item id, and let's presume #47 is a "widget cleaner"

It seems the school of thought these days to rewrite such a url would be to produce something like this:
somesite.com/item.php/widgets/accessories/widget_cleaner/
I'm seeing quite a few seos use this method, and it seems their site is getting indexed well. One concern I have in this example is the item is 5 level deep, and google often reduces pagerank by 1 for each level.

But is general though, I would love to hear your comments about the above or similar examples.

r2d2
06-10-2005, 10:17 AM
One concern I have in this example is the item is 5 level deep, and google often reduces pagerank by 1 for each level.

This is completely untrue. PR is based on links, and has nothing to do with folder depth whatsoever.

That a good way of doing it, but I would change 'item.php' to 'item' and use .htaccess to get it processed as PHP. This way SEs cant know you are using dynamic URLs.