View Full Version : Sam's Remove & Prevent duplicate content with the canonical tag

12-14-2009, 10:00 AM
This script will dynamically read the query string calling the page, remove any parameters that have/may cause duplicate content issues with search engines and generate a canonical tag with the modified query string. The search engines will effectively interpret this as a 301 redirect, there will be no effect on the page or url for your visitors.

Produces a correctly formatted canonical tag as per your current url (seo or otherwise).
Search engines will modify their index according to the tag, removing any duplicates.
Any ranking spread caused by the duplicates will be consolidated onto the correct page.
Any un=listed query string param's will remain un-effected, barring ensuring a correctly formatted string.
Very simple short code addition
Will also optionally remove any duplicate content issues with ssl pages.
Any instances of the osCsid param will be removed.
Default removed param's are: currency, language, page, sort, ref, affiliate_banner_id & osCsid.
If you have an existing install of a meta tag contribution, the install only requires the addition of a single line of code and one added function.

Tested on PHP 4 & 5, SQL 4 & 5, osC 2.2 ms2, rc1 & rc2a and is register_globals off compatible.

Support thread will be found here. http://forums.oscommerce.com/topic/350604-remove-prevent-duplicate-content-with-the-canonical-tag/

More... (http://addons.oscommerce.com/info/7163)