Good day,
Some time ago I read about search engines seeing links with and without cPath as different links, seeing this as dual content, this being a bad thing.
I don't know if that has been solved or not, but since I couldn't find anything about it and it was possible on my install I looked for a solution.
I adjusted a piece of code someone else on this board put together for me (originally so I could redirect old incoming quick-cart links to the new zen-cart links).
This code checks if a product_info link has a cPath, and if it doesn't it looks it up and redirects with a 301 moved permanently header.
So far it seems to work, if anyone spots any problems with this system I'd love to hear about it.
There's probably tons of places to put this and it'll work, I just put it in index.php below:Code:if ($_GET['main_page'] == 'product_info' && !(isset($_GET['cPath'])) && isset($_GET['products_id']) && (int)$_GET['products_id'] > 0) { $iProducts_id = (int)$_GET['products_id']; Header( "HTTP/1.1 301 Moved Permanently" ); zen_redirect(zen_href_link(zen_get_info_page($iProducts_id), 'cPath=' . zen_get_product_path($iProducts_id).'&products_id='.$iProducts_id)); }
Code:/** * Load common library stuff */ require('includes/application_top.php');"




