PDA

View Full Version : Duplicate Content on OScommerce, rel canonical to the rescue



Chris
07-02-2009, 08:33 PM
To fix duplicate content issues on product pages in OScommerce open up your product_info.php file

place this code



<link rel="canonical" href="http://www.example.com/product_info.php/products_id/<?=$HTTP_GET_VARS['products_id'];?>" />

directly above your </head> tag so it looks like:



<link rel="canonical" href="http://www.example.com/product_info.php/products_id/<?=$HTTP_GET_VARS['products_id'];?>" />
</head>

Assuming you use the SE friendly URLs, if not, change the url to the format you use.

All done. Easy, why didn't I do this earlier?