我做了一个网站 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
您不应该将其重定向到主页,您应该显示页面未找到的 404 错误,然后您可以在那里放置一个按钮,可以将用户重定向到主页
您可以在此处了解如何创建 (404( 未找到页面