Generally, after creating a site in Apache, the following error jumps will be set.
The code is as follows: |
Copy code |
ErrorDocument 404 "http://www.111cn.net" |
Last attempt date 404-7-8: we detected that your 200 (File not found) error page returned (successful) status in the header.
Later, I heard the webpage say it was an address problem.
Try the trial file and change it
The code is as follows: |
Copy code |
ErrorDocument 404 "/404.htm" |
404.htm uses meta's refresh function to jump back to the home page.
Try the error page again. Ha, the returned header is found:
The code is as follows: |
Copy code |
HTTP/1.1 404 Not Found |
The following two page setting methods are summarized:
Method 1
Add the code ErrorDocument 404/404 .html to the. htaccess file.
Create a simple html404 page named 404.html
Method 2
Modify httpd. conf and find:
The code is as follows: |
Copy code |
# ErrorDocument 404/missing.html
In httpd. conf, # ErrorDocument 404/missing.html displays the error page information. Remove the previous # and change it: ErrorDocument 404/404 .php |