"the 404 should solve that. If it does not solve it all, an
examination of HTML return
codes should find the exceptions to the redirect and solve it"
In web.config find the custom errors element. You can handle the 404
like this:
<customErrors defaultRedirect="ErrorPage.aspx" mode="On">
<error statusCode="404" redirect="filenotfound.aspx" />
</customErrors>
Here are a list of HTTP codes you can handle:
http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
This means you can do the following, if you wish:
<customErrors>
<error statusCode="400" redirect="BadRequest.aspx" />
<error statusCode="401" redirect="Unauthorized.aspx" />
<error statusCode="403" redirect="Forbidden.aspx" />
<error statusCode="404" redirect="NotFound.aspx" />
<error statusCode="405" redirect="MethodNotAllowed.aspx" />
<error statusCode="406" redirect="NotAcceptable.aspx" />
<error statusCode="407"
redirect="ProxyAuthenticationRequired.aspx" />
<error statusCode="408" redirect="RequestTimeout.aspx" />
<error statusCode="409" redirect="Conflict.aspx" />
<error statusCode="410" redirect="Gone.aspx" />
<error statusCode="411" redirect="LengthRequired.aspx" />
<error statusCode="412" redirect="PreconditionFailed.aspx" />
<error statusCode="413" redirect="RequestEntityTooLarge.aspx" />
<error statusCode="414" redirect="RequestUriTooLong.aspx" />
<error statusCode="415" redirect="UnsupportedMediaType.aspx" />
<error statusCode="416"
redirect="RequestRangeNotSatisfiable.aspx" />
<error statusCode="417" redirect="ExpectationFailed.aspx" />
<error statusCode="500" redirect="InternalServerError.aspx" />
<error statusCode="501" redirect="NotImplemented.aspx" />
<error statusCode="502" redirect="BadGateway.aspx" />
<error statusCode="503" redirect="ServiceUnavailable.aspx" />
<error statusCode="504" redirect="GatewayTimeout.aspx" />
<error statusCode="505" redirect="HttpVersionNotSupported.aspx" />
</customErrors>
Note that it is either impossible or nearly impossible to hit some of
these with a web site, but it gives you the idea.
Peace and Grace,
--
Gregory A. Beamer (MVP)
Twitter: @gbworld
Blog:
http://gregorybeamer.spaces.live.com
*******************************************
| Think outside the box! |
*******************************************