Core code:
Copy CodeThe code is as follows:
@header ("http/1.1 404 Not Found");
@header ("status:404 not Found");
echo ' echo 404 ';
Exit ();
If you need to load 404 of pages can be the following code, mainly note the file path
Copy CodeThe code is as follows:
@header ("http/1.1 404 Not Found");
@header ("status:404 not Found");
Include (".. /.. /404.htm ");
Exit ();
See if 404 settings are successful you can use Firefox's Firebug plugin to view
View methods
In the case of installing Firebug, use the Firefox browser to open the page to check the 404 status Code, click on the bug icon in the lower right corner, start the "Network" tab, turn on "network – all/html–headers"; If everything works, you can see that includes headers , and the response to the various page parameters.
404 page impact on the site
The impact on SEO is not big. But there is, better than nothing. If you have this permission, you'd better set up a 404 page. This thing is like a site map, not all sites have to be set, but sometimes there is a need to set up.
Consider whether you want to set up 404 pages, you should consider the user experience, rather than SEO.
Check out the Apache 404 definition.
Apache Set 404 error page The way to set up 404 error pages for Apache server is simple, just add the following to the. htaccess file:
ErrorDocument 404/notfound.php
http://www.bkjia.com/PHPjc/326285.html www.bkjia.com true http://www.bkjia.com/PHPjc/326285.html techarticle Core Code: Copy code code as follows: @header ("http/1.1 404 Not Found"), @header ("status:404 not Found"); Echo ' echo 404 '; exit (); If you need to load 4 04 page can be the following code, ...