Each site is basically not less than 404 this page, 404 page is the role of the user to visit a nonexistent page in your site or inaccessible pages, this time through the 404 page to the current user a friendly and clear reply. Tell him the address doesn't exist, and tell him what to do next.
In the PHP program, we also often need to consider how to use PHP to implement page 404 jump, the following how the author will use PHP 404 to change the wording and share!
@header ("http/1.1 404 Not Found");
@header ("status:404 not Found");
echo ' echo 404 ';//output page error message directly
Exit (); or: @header ("http/1.1 404 Not Found");
@header ("status:404 not Found");
Include ("http://www.scutephp.com/404.html");
Jump to a page, it is recommended to use this method, note that the include file path cannot be a network path
Exit ();
To see if the 404 settings are successful, you can use the Firefox Firebug plugin to view the following: In the case of the installation of Firebug, use the Firefox browser to open the page to check the 404 status code, click the bug icon in the lower right corner, start the "Network" tab, Turn on "Network – all/html–headers"; If everything works, you can see the page parameters including headers and responses.
Also here is the definition of the Apache 404 error page, specifically defined as follows:
Create a new. htaccess file in the root directory of the Web site, and then add the following to the file:
ErrorDocument 404 http://www.scutephp.com/404.html