cancel
Showing results for 
Search instead for 
Did you mean: 

Products in subcategory URL

Highlighted

Products in subcategory URL

  • Root Category
    • Category 1
      • Sub Category 1
      • Sub Category 2
    • Category 2

When creating a product, if I only put it in "Sub Category 1" the url for the product when on the page for "Category 1" is 

 

/category-1/product/view/id/1/s/product-urlkey/category/2/ (not good)

 

But if I'm on the page for "Sub Category 1" the url is

 

/category-1/sub-category-1/product-urlkey.html (good)

 

The second URL is what I want to show everywhere. If I put the product in "Category 1" as well then you can also reach the product with

 

/category-1/product-urlkey.html

 

Which I don't want multiple urls leading to the same product.. How do I set this up correctly so a product in a sub category or a sub sub category will only use the complete category tree as its URL? The store should also never show a url like "/category-1/product/view/id/1/s/product-urlkey/category/2/" so how do I make sure that never happens too?