PbootCMS网站访问页面提示:您访问的页面不存在,请核对后重试!如何改成自动404跳转页面
- 操作步骤:
- 依次打开根目录
/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 }, 1000); // 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>
- 依次打开根目录

扫码添加技术【解决问题】
专注企业网站建设、网站安全16年。
承接:企业网站建设、网站修改、网站改版、BUG修复、问题处理、二次开发、PSD转HTML、网站被黑、网站漏洞修复等。
专业解决各种疑难杂症,您有任何网站问题都可联系我们技术人员。
本文来自博客园,作者:黄文Rex,转载请注明原文链接:https://www.cnblogs.com/hwrex/p/18508016

浙公网安备 33010602011771号