Discussions

aliases for products in multiple categories ?

How do you deal with url rewriting for products in multiple categories ?
Pathauto could(as far i know) generate only one url for each content, in this case we would need as much aliases as much categories.

ex: product1 has 3 categories and product2 has 1 category:

http://mysite.com/cat1/product1
http://mysite.com/cat2/product1
http://mysite.com/cat3/product1
http://mysite.com/cat2/product2

To avoid duplicate content, google recommends to insert main canonical url for duplicate content, in our case "node/nid"

Magento does this sort of things.

Posted: Dec 15, 2011

Comments

PN on December 16, 2011

Just an opinion, but you may not want to make your product display paths dependent on categories, especially if you have products referencing multiple categories.

  1. If a product changes categories you'll have to redirect from the old paths to the new paths
  2. Duplicate product displays of the same product may result in duplicate content

My suggestion would be to display the products on taxonomy category pages using Views. This way users can find your products in multiple categories which all link to 1 product page. I hope this helps.