我为同一个VM创建了两个域名。例如。http://app1.domain.com http://app2.domain.com
目前,两者都指向端口80,应用程序运行良好。我的要求如下:
上打开一个不同的应用程序。
我怎么能这么做?我尝试过Url重写/重定向,但无法使其工作。我是IIS功能新手。有人能帮忙做任何例子/截图吗?
发布于 2019-10-11 05:31:05
您可以使用bwlo重写规则:
<rule name="rule1" enabled="true" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{HTTP_HOST}" pattern="^app1.domain.com$" />
</conditions>
<action type="Redirect" url="http://localhost:80" />
</rule>
<rule name="rule2" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{HTTP_HOST}" pattern="^app2.domain.com$" />
</conditions>
<action type="Redirect" url="http://localhost:90" />
</rule>


https://stackoverflow.com/questions/58326485
复制相似问题