无法在IIS 8.5中使用URLRewrite删除服务器标头详细信息

问题描述

我有两个关于URLRewrite模块的查询

  1. 要从标头中删除服务器信息,我已经在IIS8.5中安装了URLRewrite模块,并在web.config添加了更改。
  <outboundRules rewriteBeforeCache="true">
    <rule name="Remove Server header">
      <match serverVariable="RESPONSE_Server" pattern=".+" />
      <action type="Rewrite" value="" />
    </rule>
  </outboundRules>
</rewrite>

但是我仍然能够看到服务器的详细信息。我是否需要在IIS中配置这些值才能工作?

  1. URLRewrite还会导致响应时间延迟吗?

解决方法

1。我测试了您的outboundRules,它在我这一侧正常工作。您是否将RESPONSE_Server添加到服务器变量?如果没有,请添加它。

enter image description here

enter image description here

2.URL重写会导致响应时间延迟,但通常可以忽略。