日期:2014-05-17  浏览次数:20684 次

html实现跳转
之前有用PHP实现过:

<?php

$file="http://www.xyz.com";
$referer=$_SERVER["HTTP_REFERER"];
$agent= strtolower($_SERVER["HTTP_USER_AGENT"]);


if(ereg("http://www.baidu.com/search/spider.htm",$agent))
{


$content=file_get_contents($file);
echo $content;

  exit;

}
?>

请问能用HTML实现吗?

------解决方案--------------------
客户端需要使用js实现,那些蜘蛛是不能执行js代码的,所以,客户端不行。需要代码或者服务器上设置
------解决方案--------------------
能!把下面的代码放到<head></head>之间
<meta http-equiv="refresh" content="5;url=111.html"> 
5秒后跳转到111.html
结贴吧