Canonical URLs are intended to indicate to search engines that an alternative, preferred version of page exists, so if you make sure that this situation doesn't occur then there is no need to provide a canonical, however there is one scenario where you might want to provide a canonical and that is sorted search results, with the canononical being the equivalent default sorted URL.
This is straight forward to apply within html/header.php simply by checking for &sort in the REQUEST_URL and providing a canonincal with the sort parameter removed. To give this a go, look for the closing </head> tag and insert the following code just before it:
Hi Steve,
Canonical URLs are intended to indicate to search engines that an alternative, preferred version of page exists, so if you make sure that this situation doesn't occur then there is no need to provide a canonical, however there is one scenario where you might want to provide a canonical and that is sorted search results, with the canononical being the equivalent default sorted URL.
This is straight forward to apply within html/header.php simply by checking for &sort in the REQUEST_URL and providing a canonincal with the sort parameter removed. To give this a go, look for the closing </head> tag and insert the following code just before it:
<?php
if (isset($sort) && (strpos($_SERVER["REQUEST_URI"],"&sort=")!==FALSE))
{
$canonical = str_replace("&sort=".$sort,"",$_SERVER["REQUEST_URI"]);
print "<link rel='canonical' href='".$canonical."' />";
}
?>
Cheers,
David.
--
PriceTapestry.com