To clarify redirectMode="ResponseRewrite" prevents the 302 redirect being issued allowing the error handling page to implement normal functionality. i.e. catching the exception, generally an HttpException and setting the Http status code accordingly.