404 not found page appears what is the reason? How to solve it?

When you visit the website often encounter prompts 404 not found a phenomenon, can not continue to visit, so pages appear 404 not found what is the reason? How to solve it? And Xiao Yun Xiao Bian look at it.
404 not found page appears what is the reason?  How to solve it?

404 not found in fact represents a 404 page, when users browse the Web, because the server can not provide the information properly, or the server is unable to respond, and do not know the cause of the error and return to the page. The purpose is to tell the search engine that the page does not exist, no longer allow search engine crawlers to go on a visit this page!

Page 404 not found reason to trigger prompts are the following:

1, user input error due to enter the link address, causing IIS tips 404 not found.

2, the original page is deleted on the server, and this happens more large-scale forums, BBS forums in order to protect the reasonable use of server resources, will expire or very old information page deletion occurs, resulting in 404 not found.

3, when the user is prohibited in the country access to some foreign websites visited, there will be 404 not found a phenomenon, which requires the use of a proxy server to normal browsing.

404 not found an effective solution to the Web page appears:

1, due to the route change caused web content when 404 not found, we can point to a custom 404 error page in IIS dynamic, use 301 redirects to jump to a new address on the inside pages, then the server returns a 301 status code.

2, a design html file, point to the html file 404, then the page is returned status code 404, the following steps:

Open IIS Manager -> Click to set custom website 404 Properties -> Click custom error Options -> Select 404 -> select Properties and open the Edit -> set to URL -> URL in fill "/err404.html" -> press OK to exit and then do a good job err404.html page uploaded to the web root directory. Here in the "Message Type" must choose "File" or "Default", but do not select "URL", otherwise, would result in a return "200" status code.

3, 404 points to a dynamic page

For example error.asp, if not inside the page set, only the prompt return of HTML code that will cause the page to return a 200 status code, which is not true, we can finish prompt after displaying content, increasing the sentence: Response.Status = "404 Not Found", thus ensuring that the page returns a 404 status code.

4, set up under the Apache error page 404

Set 404 error page for the Apache Server is very simple, just add the following to the .htaccess file, ErrorDocument 404 /notfound.php

Guess you like

Origin blog.51cto.com/14540004/2457351