打开程序根目录的 web.config文件进行编辑,在其中加入如下内容:
<configuration>
<system.web>
<customErrors mode=On defaultRedirect=error.asp>
<error statusCode=404″ redirect=notfound.asp />
</customErrors>
</system.web>
</configuration>
注:上文例中error.asp为系统默认的404页面,notfound.asp为自定义的404页面,使用时请修改相应文件名。 然后,在自定义的404页面notfound.asp中加入:
<% Response.Status = 404 Not Found %>

咨询热线:








建站咨询

