In linux, how does one customize the 404 error page? -PHP development

Source: Internet
Author: User
The entire transfer process of the website is very smooth, except that the 404 error page settings are different from those of windows systems. In linux, how does one set a custom 404 error page? The following two steps are involved: 1. Check whether the. htaccess file exists in the root directory of the website. If not, create one. In. in the htaccess file, add the following statement: During the Golden Week of the 11 S, the lease preparation for a website space managed by my staff has expired. After confirming that you do not need to bind a subdomain name, therefore, the website is transferred from the original windows2003 system to the linux system. This is also due to cost-effectiveness. Because of the same space, linux is much cheaper than window.


The entire transfer process of the website is very smooth, except that the 404 error page settings are different from those of windows systems. In linux, how does one set a custom 404 error page?


The following two steps are implemented:

1. Check whether the. htaccess file exists in the root directory of the website. If not, create one. Add the following statement to the. htaccess file:

ErrorDocument 404/404 .html

2. Create a 404.html file under the root directory of the website. The file suffix must be consistent with the file specified in. htaccess.


Success, indicating that the custom 404 error page is successful.

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.