I have been trying to have my web app to redirect to a custom 404 page. It works for all urls except if they have a ".aspx" extension
The server is a Windows Server 2008 and here are the following settings I have in my web.config (using google.com as a quick example):
<customErrors defaultRedirect="http://www.google.com" mode="On" redirectMode="ResponseRedirect"></customErrors>
<httpErrors errorMode="Custom">
<clear />
<remove statusCode="500" subStatusCode="-1" />
<remove statusCode="404" subStatusCode="-1" />
<error statusCode="404" prefixLanguageFilePath="" path="/404-Page/" responseMode="ExecuteURL" />
<error statusCode="500" prefixLanguageFilePath="" path="/404-Page/" responseMode="ExecuteURL" />
</httpErrors>
Again the HTTP Errors work for everything but extensions of ".aspx"