404 not found是什么意思?(如何解决?)

What does 404 not found mean?

When a user enters a link, the IIS (Internet Information Services) on the server first checks if there is a corresponding webpage information for the link. If there is no corresponding webpage information, IIS will send a 404 error code page prompt to the end user through the server, indicating that the webpage information corresponding to the link cannot be found.

Why does 404 not found occur?

The first case: The user entered link is incorrect, resulting in the 404 not found prompt from IIS.

The second case: The webpage that should exist on the server has been deleted.

The third case: DNS settings are blocking access. Some blocked foreign websites may also result in a 404 not found response when viewed in China.

From a professional perspective, there are three situations that can cause this problem:

1. Unable to access the web page on the requested port.

2. The web service extension lockdown policy is blocking the request.

3. The MIME mapping policy is blocking the request.

Introduction to resolving 404 not found:

When browsing websites, you may encounter various connection errors. The most common 404 NOT FOUND error message is mainly because IE cannot find the webpage file you requested.

1. For web page content that cannot be accessed due to a changed path, you can define a 404 error in the IIS to point to a dynamic page. In the page, use a 301 permanent redirect to redirect to the new address. At this time, the server returns a 301 status code.

2. Set 404 to point to a designed HTML file. At this time, the page returns a 404 status code. Most IDC providers now offer the ability to set 404, just upload the file and set it. In IIS, the method is as follows: Open IIS Manager → Click on the properties of the website to set the custom 404 → Click on the custom error option → Select the 404 page → Select and open Edit Properties → Set to URL → Fill in "/err404.html" in URL → Press OK to exit, and then upload the created err404.html page to the website's root directory. In "Message Type," be sure to choose "File" or "Default Value," instead of "URL," otherwise it will cause a return of "200" status code.

3. Set 404 to a dynamic page, such as error.asp. If the settings are not done within the page itself and only the HTML code is returned as a prompt, the page will return a "200" status code, which is incorrect. We can add the statement "Response.Status="404 Not Found"" after displaying the prompt content to ensure that the page returns a 404 status code.

4. Setting 404 error page in Apache. Add "ErrorDocument 404 /notfound.php" to the .htaccess file and edit this section.

404 not found is used to inform users that the webpage cannot be accessed.