vi ./themes/17mb/msgerr.html

<script language=”JavaScript”>
self.location=’/’;
</script>

========================================================================================================================================================================

小说id不存在的跳转为首页

电脑端 在reader.php或者package.php,reader.php为加密的需先解密:

$mysqli = new mysqli(JIEQI_DB_HOST,JIEQI_DB_USER,JIEQI_DB_PASS,JIEQI_DB_NAME);
$articleid_res = $mysqli->query(“select articleid from `jieqi_article_article` where articleid=”.$this->id)->fetch_row();
mysqli_close($mysqli);
if($articleid_res==NULL){
header(‘HTTP/1.1 301 Moved Permanently’);
header(‘Location: ‘.$_SERVER[‘REQUEST_SCHEME’].”://”.$_SERVER[‘HTTP_HOST’]);
exit;
}

 

手机端 info.php:程序不一样判断方式不一样,选取对应的代码

if($articleArrs[0][‘articlename’]==NULL){
header(‘HTTP/1.1 301 Moved Permanently’);
header(‘Location: ‘.$_SERVER[‘REQUEST_SCHEME’].”://”.$_SERVER[‘HTTP_HOST’]);
exit;
}

 

 

if($article==NULL){
header(‘HTTP/1.1 301 Moved Permanently’);
header(‘Location: ‘.$_SERVER[‘REQUEST_SCHEME’].”://”.$_SERVER[‘HTTP_HOST’]);
exit;
}

 

 

if($infoarr==”){
header(‘HTTP/1.1 301 Moved Permanently’);
header(‘Location: ‘.$_SERVER[‘REQUEST_SCHEME’].”://”.$_SERVER[‘HTTP_HOST’]);
exit;
}

 

 

$mysqli = new mysqli($_17mb_host,$_17mb_user,$_17mb_pass,$_17mb_name);
$articleid_res = $mysqli->query(“select articleid from `jieqi_article_article` where articleid=”.$_GET[aid])->fetch_row();
mysqli_close($mysqli);
if($articleid_res==NULL){
header(‘HTTP/1.1 301 Moved Permanently’);
header(‘Location: ‘.$_SERVER[‘REQUEST_SCHEME’].”://”.$_SERVER[‘HTTP_HOST’]);
exit;
}

发表评论

邮箱地址不会被公开。 必填项已用*标注