在IIS中忽略HTTP 1.0请求

有没有办法忽略IIS(7.0)中的HTTP 1.0请求? 我没有看到任何理由接受不是HTTP 1.1的请求。

第1步:下载并安装URL重写 。
第2步:将以下内容添加到您的web.config文件中,到<system.webServer>部分:

 <rewrite> <rules> <rule name="RequestBlockingRule1" patternSyntax="Wildcard" stopProcessing="true"> <match url="*" /> <conditions> <add input="{SERVER_PROTOCOL}" pattern="HTTP/1.0" /> </conditions> <action type="AbortRequest" /> </rule> </rules> </rewrite> 

这将拒绝所有HTTP 1.0请求与HTTP 504错误代码。

编辑:安装URL重写后,您还可以在IISpipe理器中configuration重写规则:

在这里输入图像说明