【发布时间】:2018-06-17 13:07:12
【问题描述】:
我需要仅使用我的 web.config 实现反向代理,但遇到了 500.52 错误的问题。正如网上许多地方所建议的那样,我添加了 serverVariables 部分以包含 HTTP_ACCEPT_ENCODING 变量,但我遇到了一个错误:
配置错误无法识别元素“serverVariables”
下面是我的 web.config。
<rewrite>
<allowedServerVariables>
<add name="HTTP_ACCEPT_ENCODING" />
</allowedServerVariables>
<outboundRules>
<rule name="reverseProxy">
<match pattern="http://linkInCode.com"></match>
<serverVariables>
<set name="HTTP_ACCEPT_ENCODING" value="" />
</serverVariables>
<action type="Rewrite" value="https://linkIWant.com/script.js"></action>
</rule>
</outboundRules>
</rewrite>
有什么问题? ServerVariables 应该是一个可识别的元素。
【问题讨论】:
标签: iis-7 reverse-proxy url-rewrite-module