PBOOTCMS网站访问页面提示:您访问的页面不存在,请核对后重试!如何改成自动404跳转页面

应用户要求,访问Pbootcms网站,很多死链提示您访问的页面不存在,请核对后重试!

要将这个改成1秒后自动跳转.

下面说下方法:

依次打开根目录/core/template/error.html

将error.html修改下即可。例如,一秒后跳转百度。

<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <title>错误信息</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0" />
 <meta name="apple-mobile-web-app-capable" content="yes" />
</head>
<body>


<div style="margin-left:10%;margin-top:5%;">
    <div style="margin-bottom:20px;"><img src="{coredir}/template/face02.png" height="120"></div>
    <div style="font-size:20px;margin-bottom:20px;">{info} <span id="time" style="font-size:18px;"></span></div>
    <div style="margin-bottom: 1rem;">
 
<p>页面将在1秒后自动跳转到另一个页面...</p>

<script>
setTimeout(function() {
    window.location.href = 'http://www.baidu.com/'; // 替换为你想要跳转的URL
}, 100); // 1000毫秒后执行
</script>

  
    </div>
    <div><span style="font-size:12px;border-top:1px solid #ccc;color:#ccc;padding-top:2px;">
     程序版本:{appversion}
    </span></div>
</div>

{js}

</body>
</html>


上一篇 pbootcms增加webp和mov等上传文件类型的方法
下一篇 pbootcms网站后台 百度普通收录推送发生错误:site error

在线客服

专业客服团队,为您提供贴心服务

QQ客服 2305035643
微信客服 扫码添加
微信客服二维码

扫码添加微信客服

电话咨询 18029603035
改版服务 代码修改
二维码

扫码了解详情

服务时间:周一至周日 9:00-22:00

客服热线:18029603035