Had an issue redirecting 400 errors using httpErrors. Seems like you need to pass in existingResponse=”Replace” for it to work.
For more information : https://docs.microsoft.com/en-us/previous-versions/iis/settings-schema/ms690497(v=vs.90)
<httpErrors errorMode="DetailedLocalOnly" existingResponse="Replace">
<remove statusCode="400" subStatusCode="-1" />
<remove statusCode="404" subStatusCode="-1" />
<error statusCode="400" prefixLanguageFilePath="" path="https://somewhere/400.html" responseMode="Redirect" />
<error statusCode="404" prefixLanguageFilePath="" path="https://somewhere/404.html" responseMode="Redirect" />
</httpErrors>
Leave a Comment