我为同一VM创建了两个域名。例如。 http://app1.domain.com http://app2.domain.com
当前两者都指向端口80,应用程序运行正常。 我的要求如下:
我该怎么做?我尝试了网址重写/重定向,但无法使其正常工作。我是IIS功能的新手。有人可以帮忙提供任何示例/屏幕截图吗?
答案 0 :(得分:0)
您可以使用bwlo URL重写规则:
<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>