【问题标题】:Unable to remove server header details with URLRewrite in IIS 8.5无法在 IIS 8.5 中使用 URLRewrite 删除服务器标头详细信息
【发布时间】:2021-01-08 04:38:07
【问题描述】:

我有两个关于 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 会导致响应时间延迟吗?

【问题讨论】:

标签: iis http-headers iis-8 url-rewrite-module


【解决方案1】:

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

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

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2022-06-23
    • 2014-04-19
    • 2016-05-09
    • 1970-01-01
    • 2017-07-16
    • 2021-06-13
    • 2020-08-03
    • 2019-01-08
    相关资源
    最近更新 更多