首页 文章

IIS 8.5 URL重写

提问于
浏览
0

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

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

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

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

在此先感谢您的帮助...

1 回答

  • 0

    尝试使用以下网址重写规则:

    <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>
    

相关问题