Forum Moderators: coopster
To entirely prevent a page's contents from being listed in the Google web index even if other sites link to it, use a noindex meta tag or x-robots-tag. As long as Googlebot fetches the page, it will see the noindex meta tag and prevent that page from showing up in the web index. The x-robots-tag HTTP header is particularly useful if you wish to limit indexing of non-HTML files like graphics or other kinds of documents.
<?php
/*
Use the following link format:
<a href="/goto.php?p=XXXXXX">XXXXXX</a>
*/
$p = $_GET['p'];
switch ($p)
{
/*widget1*/
case "widget1":
$link = "/widget1.htm";
break;
/*Default*/
default:
$link = "/default.htm";
}
header("X-Robots-Tag: noindex, nofollow, noarchive", true);
header("Location: $link");
exit();
?>
HTTP/1.1 302 Found
X-Robots-Tag: noindex, nofollow, noarchive
Location: http://www.widgets.com