Hello
I am going to turn on search friendly urls (they have always been off). However the product.php pages are already indexed and I am not sure how to redirect product.php?q=product to product.html dynamically without breaking the links are creating duplicate content.
Any ideas?
Regards
Hi Andy,
Look for the following code at the top of products.php:
$q = (isset($_GET["q"])?tapestry_normalise($_GET["q"],":\."):"");
$rewrite = isset($_GET["rewrite"]);
...and if you will, from now on, always be using rewite, add this new code immediately afterwards:
if (!$rewrite)
{
$href = $config_baseHREF."product/".tapestry_hyphenate($q).".html";
header("HTTP/1.1 301 Moved Permanently");
header("Location: ".$href);
}
Cheers,
David.