Today, I found a lot of information about the 404 page on the Internet, in order to get some knowledge about 404.
Login the google management tool background and find that the website is not verified, and prompt: We detected that your 404 (file not found) error page returned a 200 (success) status in the header. (When this problem occurs, be sure to pay attention to it)
When using google sitemaps to verify your website, if you use html file verification, you will always encounter such an error (we detected your 404 (not found) The file to error) page returns status code 200 (OK) in the response header, and verification cannot be completed and can only be verified with a meta tag.
This is a problem with the host 404 file configuration, the netizen said so, but I set it on the 404 error page according to the website information, and after the custom 404 error page is set, use the Server Header check Tool, enter a url that does not exist in the web page, check the return status of the HTTP header, returning not "404 Not found", or 200 status code.
No matter how the background management of the server's space provider changes or deletes the custom 404 error page settings, the effect is the same. The http status return value is 200 instead of "404 Not found". Later, I concentrated on the wisdom, and simply deleted the custom 404 error page I wrote, and the server's background custom 404 error setting still retains the link of the 404 error page. Using the Server Header checker, test it and find that the status code returns 404, and it is the system default 404 error page.
The website information is as follows (Note: Most of the first two types of website space servers are not supported, only support .html or htm):
(1) Apache error page is set under Apache
Set the 404 error page for Apache Server is very simple, just add the following content to the .htaccess file: ErrorDocument 404 /notfound.php
Note:
1. Remember Don't redirect 404 errors to the homepage of the website, otherwise it may cause the homepage to disappear in the search engine.
2. Remember not to use absolute URLs. If you use absolute URLs, the status code returned is "302" + "200" ( Tested)
(2) Set 404 error page under IIS/ASP.net
First, modify the settings of the application root directory, open the "web.config" file editor, and add it to it. The following content:
Note: "erro" in the above example R.asp" is the default 404 page of the system, and "notfound.asp" is a custom 404 page. Please modify the file name when using it.
Then, add in the custom 404 page "notfound.asp":
<%
Response.Status = "404 Not Found"
%>
This will ensure that IIS can correctly return the "404" status code
(c) Set 404 static page under IIS/ASP.net
The method of setting a static 404 error page is relatively simple. Right-click the website you want to manage in IIS Manager, open the "Custom Error Information" page in "Properties", and set the corresponding error information page for "404". can. However, here you must select "File" or "Default" in "Message Type" instead of "URL", otherwise it will result in a "200" status code.
The server is one of the more important devices in the LAN. If it accidentally fails, many access ac
I am a network administrator, recently installed the Windows 2003 server operating system on one, an
In this article, we will work together to see how shortcuts can help users improve their productivit
phenomenon: After installing mysql, mysql find phpmyadmin can not log in, return
MySQL server optimization in Linux environment
How to configure Win 2003 DNS server
Unable to run ASP program under IIS
What issues should you pay attention to when migrating a file server?
T100 G11 power-on self-test prompts how the memory capacity is reduced
Set up a DHCP server under Linux
How to optimize SQL Server Server
Two major problems that lead to low cooling efficiency in the engine room
What should I do if the win7 system configuration Bluetooth option is not available?
What should I do if the Linux server is attacked by a rootkit?
Xiaobai Savior: Lenovo released a PDF version of the Win10 user guide for Windows users.
Win2000 boot disk and system recovery
Using a modem to activate Win7 in order to use the various functions of the system
How to safely and permanently delete file data under Windows
How do win10 enterprise users manage WiFi automatic connection?