0

I have found that the navigation is giving us too many internal links which is not good for seo. To stop this i want the navigation menu to exclude the domain at the beginning of the url eg from: http://example.com/category/subcategory.html to /category/subcategory.html.

I have found this line: $html[] = 'getCategoryUrl($category).'">'; which i have found to change the urls. I want to make it not show the url at the beginning of the link. What do i need to change to do this, i cannot see what I need to remove or change.

1 Answer 1

1

It seems to me that the code for getting a category url is in:

Mage_Catalog_Model_Category_Url

You will need to rewrite this class and then implement your own getCategoryUrl() method to return the url structure you require.

Alternatively you could create your own category url model and set the following site configuration node 'global/catalog/category/url/model' to your model.

3
  • Si's answer is indeed correct, however, it won't make any difference at all for SEO purposes. It will still be an internal link. I'm assuming your menu is listing A LOT if it's becoming a concern. Commented Apr 2, 2014 at 9:37
  • @DouglasRadburn We currently have over 500 categories which are appearing and many tools have told us this is too much
    – Ryan King
    Commented Apr 2, 2014 at 9:38
  • Yes, it is indeed too much, HOWEVER, removing the domain from the link won't make any difference whatsoever. It's still an internal link. Commented Apr 2, 2014 at 9:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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