我正在尝试通过URL Rewrite 2.1在IIS 8.5中为虚拟应用程序创建别名 该规则根本无效。我收到404错误
Here is my rewrite section in web.config:
<rewrite>
<rules>
<rule name="MBAM Helpdesk" stopProcessing="true">
<match url="https://my.site.com/helpdesk" />
<action type="Rewrite" url="https://my.site.com/Microsoft%20BitLocker%20Administration%20and%20Monitoring" />
</rule>
</rules>
</rewrite>
https://my.site.com/helpdesk返回404错误
答案 0 :(得分:0)
根据您的描述,首先,如果要重定向确切的url,则应在rule中添加patternSyntax =“ ExactMatch”,然后url rewrite中的match标签只能获取url的路径,而不是整个url。所以我建议你可以这样写:
<rule name="rule1" patternSyntax="ExactMatch">
<match url="helpdesk" />
<action type="Rewrite" url="https://my.site.com/Microsoft%20BitLocker%20Administration%20and%20Monitoring" />
</rule>