在这里,通过web.config解决这个问题,说一下如何用web.config,自定义404:
<configuration>
<system.webServer>
<httpErrors errorMode=”DetailedLocalOnly” defaultResponseMode=”File” >
<remove statusCode=”404″ />
<error statusCode=”404″ path=”404.htm” />
</httpErrors>
</system.webServer>
</configuration>