Canonical Header Tags bug fix

for osCommerce Online Merchant v2.3

After consistently getting an error message from Bing that a large number of pages had the same canonical URL I found that the osCommerce module had failed to include the page numbers for category and manufacturers listings. As noted on the Google Webmaster Blog: Mistake 1: rel=canonical to the first page of a paginated series Imagine that you have an article that spans several pages: example.com/article?story=cupcake-news&page=1 example.com/article?story=cupcake-news&page=2 and so on Specifying a rel=canonical from page 2 (or any later page) to page 1 is not correct use of rel=canonical, as these are not duplicate pages. Using rel=canonical in this instance would result in the content on pages 2 and beyond not being indexed at all. In osCommerce index.php?cpath=1 is the same as index.php?cpath=1&page=1 so the canonical links always pointed to page 1. This module now includes the page number as part of the canonical links for the category and manufacturer listings. I've also modified it to use SSL links if SSL is enabled for the web site. I figured this would be a good idea since a growing number of browsers prefer to use SSL connections whenever possible. To use this contribution simply replace the original osCommerce ht_canonical.php with this one.

Changelog