Custom 404's can be set for ASP and .NET sites by adding the below code to the bottom of the web.config file before the final </configuration>.
Classic ASP and Static Content
<configuration>
<system.webServer>
<httpErrors errorMode="DetailedLocalOnly" defaultResponseMode="ExecuteURL">
<remove statusCode="404" subStatusCode="-1" />
<error statusCode="404" prefixLanguageFilePath="" path="/404.aspx" responseMode="ExecuteURL" />
</httpErrors>
</system.webServer>
</configuration>
.NET
<configuration>
<system.web>
<customErrors defaultRedirect="404.aspx" mode="DetailedLocalOnly">
<error statusCode="404" redirect="404.aspx"/>
</customErrors>
</system.web>
</configuration>
Knowledgebase
- 0 Users Found This Useful