Forum Moderators: open
A site of mine uses a product inventory where all products are kept. The products can show up in more that one category and is then pulled from the inventory.
The Product name and product code is then inserted into the URL.
This creates a problem as there are then duplicated URL's
ex. www.mysite/categoryA/product1234
www.mysite/categoryB/subcategory1/product1234
Is there a work around this problem?
Hope you can help.
Thanks
Why do you have to insert the product search "route" into the URL?
You don't.
Use www.example.com/product1234 as the URL for the product itself.
Hold the category and subcategory data in your database to build the navigation on the page.
.
No problem to have pages like:
www.example.com/products/blue/left-handed/spherical/
and
www.example.com/products/left-handed/blue/
which then list those products, but the URL for the product page itself does *not* have to contain the names of the categories that were traversed to get there.