404 page is a tell the search engine this page does not exist, but also prompted the user can choose other operations, below I give no Apache operation rights to introduce a friend PHP custom 404 page Operation method.
Method One
The code is as follows |
Copy Code |
@header ("http/1.1 404 Not Found"); @header ("status:404 not Found"); echo ' echo 404 '; Exit (); |
Loading a 404 error page
The code is as follows |
Copy Code |
@header ("http/1.1 404 Not Found"); @header ("status:404 not Found"); Include (".. /.. /404.htm "); Exit ();
|
You can also add the. htaccess code to the site below
The code is as follows |
Copy Code |
ErrorDocument 404/404.html |
If you have APAHCE configuration permissions, we can modify the httpd.conf
Found it:
The code is as follows |
Copy Code |
#ErrorDocument "The server made a boo boo." #ErrorDocument 404/missing.html #ErrorDocument 404 "/cgi-bin/missing_handler.pl" #ErrorDocument 402 xxxxxxx |
Revision changed to
The code is as follows |
Copy Code |
ErrorDocument 404/404.htm |
http://www.bkjia.com/PHPjc/628782.html www.bkjia.com true http://www.bkjia.com/PHPjc/628782.html techarticle 404 page is a tell the search engine this page does not exist, but also prompted the user can choose other operations, the following I will give no Apache operation rights to introduce a friend PHP custom ...