2

we have category and product URLs already indexed by google so we need to add/modify Magento URL Rewrites to match those URLs. We are migrating one of the ecommerce store from yahoo to magento, but we can't change the url structure as they are already indexed by google.

So basically, what I want is..

Magento URL: http://www.website.com/cat1/cat2.html Need URL: http://www.website.com/cat2.html

Magento URL: http://www.website.com/cat1/product.html Need URL: http://www.website.com/product.html

Magento URL: http://www.website.com/cat1/cat2/product.html Need URL: http://www.website.com/product.html

At one extent I managed to solve this with product pages, by enabling Canonical URLs for categories and products from backend. But that doesn't help for all the cases, like for multiple categories in the URL.

Any help will be much appreciated!

UPDATE: I have disabled "Use Categories Path for Product URLs" and URLs with products are working as it should be. But the category link is still not solved. If there are multiple categories in the url, then issue still comes.

So, the original Magento URL www.website.com/cat1/cat2.html should be www.website.com/cat2.html only without cat1 in url.

  • Version of Magento and Stack specifics may help. – B00MER Aug 26 '13 at 8:09
3

You can solve this via admin setting in system->configuration->catalog->search engine optimization.

'Use Categories Path for Product URLs' set to no, and re-index url_rewrites.

This will remove the category from urls.

  • Yes I did that already, but that only works for products and not for categories. Please have a look at all the cases, thanks. – MagExt Aug 25 '13 at 8:11
2

It is not possible to get a child category as single name in the url by default in Magento (as your first example). You will need to add your own custom rewrites thru the Catalog>Manage URL rewrites menu. This will create redirects to the real url paths used by Magento (else you would get duplicate content). This way the users entering thru a search engine do get redirected to the correct url and will the search engine learn the new url and you can phase out the redirects.

1

Got it solved by using solution from below URL: http://www.magentocommerce.com/boards/viewthread/32328/

Hope this helps someone!

  • 3
    This broken link is super helpful. – Benjam Oct 22 '15 at 19:35
  • Unfortunately there are hundreds of posts on this website which are linked to old official magento forums for answers. google.com/… – MagExt Nov 2 '15 at 17:33
  • 2
    There are. And the way to prevent that is to not only provide the link, but to also provide the important bits from the link in the answer itself. Never post just a raw link. – Benjam Nov 3 '15 at 16:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.