? Note:

Response.Status = 404 Not Found>

< system.web >

under the condition of different

3, IIS/ASP.net set the 404 error page

< /customErrors >

then added in a custom 404 page notfound.asp:

note: error.asp above example 404 page system default, notfound.asp 404 page custom, use to modify the corresponding file name.

< configuration >

do not give 404 error directly to the website home page, which will lead to the home page will not be included in front of /Error.html; don’t take the domain name, or the status code returned is 302 or 200 status code.

code in the.Htaccess file: ErrorDocument 404 /Error.html, set up a simple html404 page named Error.html put Error.html in the web root directory.

first, modify the application root directory settings, open the web.config file in the editor, add the following content:

then added in a custom 404 page notfound.asp:

< /system.web >


mode=On defaultRedirect=error.asp < customErrors >

is a little experience in Shanghai Longfeng Shanghai Longfeng personnel engaged in all know 404 pages of the website plays a non negligible role, which bears the burden of website user experience and optimization. When the user access to the site does not exist or has already been deleted pages, the server will automatically return to the 404 error state. If you do not set the 404 page, dead link will not exist or be deleted when accessing the page, not only conducive to the user experience, but also affect the search engine included.

< /configuration >

Set 404 page

2, Apache server set 404 error page

Join the

statusCode=404 / redirect=notfound.asp < error >