In the ThinkPHP3.2 version, when we visit a page that does not exist, a very unfriendly error page appears, such as:
Workaround:
1. The thinkphp custom configuration file convention.php (file location: Root/thinkphp/conf/convention.php) In this framework is described in detail in ThinkPHP3.2, which lists the various configuration classes.
Under this file you can see:
' Tmpl_exception_file ' = Think_path. ' Tpl/think_exception.tpl ',//template file for exception page
' Error_page ' and ' = ', //Error-directed page
2. Simply add the following to the root directory/application/common/conf/config.php file:
' Tmpl_exception_file ' = './404.html ',//template file for exception page
' Error_page ' = './404.html ', //Error-directed page
Direct the user to enter the wrong URL path to all jump to the 404.html page.
ThinkPHP3.2 Setting 404 Jump page