My shopping cart works so that no matter what url you use, as long as you use the item url, regardless of what directory, it goes to the page. so /flowers/blue-olivia-flowers.html and /flowers/olivia-flowers/blue-olivia-flowers.html go to the same page. Google has indexed BOTH (and now I'm getting yelled at in my google webmasters dashboard. I have this situation for several items (I added the directory within 1 hour of the original items, but google visited within that time slot!!) I can't remove the url in webmasters because the url is still "live" by google's standards. If I block the original url (top) in robots.txt, will that affect google indexing the newer url (bottom)? Thanks!
If you have a .htaccess (you should do) Add this line - Redirect /flowers/blue-olivia-flowers.html http://putyoursitehere/flowers/olivia-flowers/blue-olivia-flowers.html Code (markup): That will redirect the old URL to the new.
Chinchilla I don't think your solution will work for him as there are many pages not only this one. I would recommend modifying one of the rewrite rules you already have in .htaccess to eliminate one of the two rules (either the aaa/aaa-bbb.html or aaa-bbb.html).
modify .htaccess so /flowers/olivia-flowers/blue-olivia-flowers.html returns 404 and only /flowers/blue-olivia-flowers.html works
Alsodo not forget to use the URL removal in Webmasters' Tools as well as modification of your google sitemap.
I suggest this: redirect 301 /flowers/blue-olivia-flowers.html http://putyoursitehere/flowers/olivia-flowers/blue-olivia-flowers.html
Simple way to do it would be to use the nofollow tag on the links for the urls you don't want indexed.
It's the best way, using 301 redirects will tell the search engine that the first url was moved to the second one permanently and will deindex the old one and pass the linking value