ThinkPHP3.2 Setting 404 Jump page

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.