前阵子网站在备案,很多人无法打开网站,无奈之中出了这么一个方案。基于ZBLOGPHP1.4进行修改。
首页index.php替换为如下内容即可。
<?php
require './zb_system/function/c_system_base.php';
$zbp->RedirectInstall();
$zbp->CheckGzip();
$zbp->Load();
$zbp->RedirectPermanentDomain();
if(strpos(strtolower($_SERVER['HTTP_USER_AGENT']),'baiduspider') !== false||$zbp->user->ID>0 )
{
foreach ($GLOBALS['Filter_Plugin_Index_Begin'] as $fpname => &$fpsignal) $fpname();
ViewIndex();
foreach ($GLOBALS['Filter_Plugin_Index_End'] as $fpname => &$fpsignal) $fpname();
RunTime();
}else{
?>
<!doctype html>
<html>
<head>
<meta charset="utf-8"/>
<title>首页</title>
</head>
<body>
<img src="https://www.birdol.com/SciurusVulgaris.jpg" style="width:100%" />
<a rel="external nofollow" target="_blank" href="http://www.miitbeian.gov.cn/">粤ICP备14083013号</a>
</body>
</html>
<?php }转载请注明:鸟儿博客 » 避免备案审查时网站排名受影响的一种设置方法