【问题标题】:IIS 8.5 URL ReWriteIIS 8.5 URL 重写
【发布时间】:2015-07-07 14:11:54
【问题描述】:

我有一个托管在两台服务器上的 asp.net 应用程序。

服务器 1:http(s)://server1.domain.com

服务器 2:http://server2.domain.com

现在我必须编写 URL 重写规则,以便将所有到达 server1 的“HTTP”请求重定向到 server2,但所有到达 server1 的“HTTPS”请求都应该由 server1 自己处理。

提前感谢您的帮助...

【问题讨论】:

    标签: asp.net iis url-rewriting


    【解决方案1】:

    尝试使用以下 url 重写规则:

    <rule name="Redirect to HTTP" stopProcessing="true">
      <match url="https://*.server1.domain.com/(*)" />
      <action type="Redirect" url="http://server2.domain.com/{R:1}" redirectType="SeeOther" />
    </rule>
    

    【讨论】:

    • 感谢您的回复.. 但以下代码对我有用.. server2.domain.com{R:0}" />
    猜你喜欢
    • 1970-01-01
    • 2015-04-28
    • 2016-01-09
    • 1970-01-01
    • 2016-07-30
    • 2017-07-29
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多