if(!eregi("www",$HTTP_HOST)) header("location: http://www.".$HTTP_HOST.$REQUEST_URI); ?>
õ»çÄü¼ºñ½º
// Quick script to 'redirect' spiders/robots to 'search engine friendly' page.
// By Dan Zambonini [dan@boxuk.com], Sep 2000. V 1.0
// Please send alterations/comments to dan@boxuk.com
// Modified from someone else's script, can't remember which one...Sorry!
// Major search engines match either $spider_footprint or $spider_ip.
$spider_footprint = array( "rawler", "pider", "obot", "eek", "canner", "lurp",
"cooter", "rachnoidea", "KIT", "ulliver", "arvest");
$spider_ip = array
("115.41.170.50");
$agent = getenv('HTTP_USER_AGENT');
$host_ip = getenv('REMOTE_ADDR');
$is_spider = 0;
// Is it a spider?
$i = 0;
while ($i < (count($spider_footprint)))
{
if (strstr($agent, $spider_footprint[$i]))
{
$is_spider = 1;
break;
}
$i++;
}
if (! $is_spider)
{
$i = 0;
while ($i < (count($spider_ip)))
{
if (strstr($host_ip, $spider_ip[$i]))
{
$is_spider = 1;
break;
}
$i++;
}
}
// Re-direct to correct page
// Change the files below to your search-engine 'keyword' page and normal index page.
if ($is_spider)
{
readfile("xdxd.html");
}
else
{
readfile("index.html");
}
?>