如何在Windows Server HTTP.SYS或IIS级别强制重定向HTTP 400错误 [英] How to Forcefully Redirect HTTP 400 Error in Windows Server HTTP.SYS or IIS levels

查看:233
本文介绍了如何在Windows Server HTTP.SYS或IIS级别强制重定向HTTP 400错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道如何在Windows Server HTTP.SYS或IIS级别中强制重定向HTTP 400错误请求错误的错误页面,据我所知,IIS仅支持400以上,
是否有任何Core HTTP 400的级别方式。错误的请求错误重定向?如果出现400错误,
或从http.sys内核回调?

I want to know How to Forcefully Redirect the Error Page for HTTP 400 Bad Request Error in Windows Server HTTP.SYS or IIS levels ,As per my knowledge IIS supporting greater than 400 only,, Is there any Core level way is there for HTTP 400. Bad Request Error Redirection?. or getting some call back from http.sys kernel if 400 error occurs?

更新备注:


- 按 TechNet Art
无法自定义以下HTTP错误:400,403.9,411,414,500, IIS中的500.11,500.14,500.15,501,503和505

Update Notes:
-- As per TechNet Art, cannot customize the following HTTP errors: 400, 403.9, 411, 414, 500, 500.11, 500.14, 500.15, 501, 503, and 505 in IIS

- Peter Quest:For Me Response来自服务器:Microsoft-HTTPAPI / 2.0

-- Peter Quest: For Me Response is coming from Server:Microsoft-HTTPAPI/2.0

推荐答案

您似乎引用 TechNet文章


您无法自定义以下HTTP错误消息:400,403.9,411,414,500,500.11,500.14,500.15,501,503和505.

You cannot customize the following HTTP error messages: 400, 403.9, 411, 414, 500, 500.11, 500.14, 500.15, 501, 503, and 505.

只有当响应来自http.sys时才会出现这种情况,您可以通过查看响应标头来判断:

This is only true if the response comes from http.sys, you can tell by looking at the response headers:

Server:Microsoft-HTTPAPI/2.0

来自http.sys, IIS发送:

comes from http.sys, while IIS sends:

Server:Microsoft-IIS/XX.X

如果响应来自http.sys,则无法对错误消息进行任何操作。

If the response comes from http.sys there is nothing you can do about the error message.

但是,如果响应来自IIS,您应该能够像任何其他http状态一样定义自定义错误页面。

But if the response comes you IIS, you should be able to define a custom error page just like for any other http status.

这篇关于如何在Windows Server HTTP.SYS或IIS级别强制重定向HTTP 400错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆