我做了一个网站https://easyfreenotes.in/,它的运行正常,但如果我想访问实际上不存在的任何错误网址,我如何将其重定向到我的主页而又不显示任何错误
Warning: include(/home/easyfree/public_html/application/views/errors/html/error_php.php): failed to open stream: No such file or directory in /home/easyfree/public_html/system/core/Exceptions.php on line 268
Warning: include(/home/easyfree/public_html/application/views/errors/html/error_php.php): failed to open stream: No such file or directory in /home/easyfree/public_html/system/core/Exceptions.php on line 268
Warning: include(): Failed opening '/home/easyfree/public_html/application/views/errors/html/error_php.php' for inclusion (include_path='.:/opt/alt/php56/usr/share/pear:/opt/alt/php56/usr/share/php') in /home/easyfree/public_html/system/core/Exceptions.php on line 268
Warning: include(/home/easyfree/public_html/application/views/errors/html/error_php.php): failed to open stream: No such file or directory in /home/easyfree/public_html/system/core/Exceptions.php on line 268
Warning: include(/home/easyfree/public_html/application/views/errors/html/error_php.php): failed to open stream: No such file or directory in /home/easyfree/public_html/system/core/Exceptions.php on line 268
Warning: include(): Failed opening '/home/easyfree/public_html/application/views/errors/html/error_php.php' for inclusion (include_path='.:/opt/alt/php56/usr/share/pear:/opt/alt/php56/usr/share/php') in /home/easyfree/public_html/system/core/Exceptions.php on line 268
Warning: include(/home/easyfree/public_html/application/views/errors/html/error_php.php): failed to open stream: No such file or directory in /home/easyfree/public_html/system/core/Exceptions.php on line 268
Warning: include(/home/easyfree/public_html/application/views/errors/html/error_php.php): failed to open stream: No such file or directory in /home/easyfree/public_html/system/core/Exceptions.php on line 268
Warning: include(): Failed opening '/home/easyfree/public_html/application/views/errors/html/error_php.php' for inclusion (include_path='.:/opt/alt/php56/usr/share/pear:/opt/alt/php56/usr/share/php') in /home/easyfree/public_html/system/core/Exceptions.php on line 268
答案 0 :(得分:1)
您不应该将其重定向到主页,应该为找不到页面显示404错误,然后可以在其中放置一个按钮,将用户重定向到主页