How to Forcefully Redirect HTTP 400 Error in Windows Server HTTP.SYS or IIS levels

我们两清 提交于 2019-12-11 13:09:50

问题


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?

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 is coming from Server:Microsoft-HTTPAPI/2.0


回答1:


It seems you are quoting from a TechNet article:

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

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

comes from http.sys, while IIS sends:

Server:Microsoft-IIS/XX.X

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

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



来源:https://stackoverflow.com/questions/32021543/how-to-forcefully-redirect-http-400-error-in-windows-server-http-sys-or-iis-leve

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!