IIS 8.5 URL重写 [英] IIS 8.5 URL ReWrite

查看:627
本文介绍了IIS 8.5 URL重写的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I have an asp.net application hosted on two servers.

服务器1:HTTP(S)://server1.domain.com

Server 1 : http(s)://server1.domain.com

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

现在我必须写URL重写规则,以便来server1的所有HTTP请求应被重定向到Server2,但所有来Server1上的HTTPS请求应该由server1的它的自我处理。

Now i have to write URL Rewrite rule so that all the "HTTP" requests coming to server1 should be redirected to server2 but all the "HTTPS" requests coming to server1 should be handled by server1 it self.

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

Thanks in advance for the help...

推荐答案

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

Try using the following url rewrite rule:

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

这篇关于IIS 8.5 URL重写的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆