我想要的是将poo.example.com
重定向到poo.example.com/home.ashx
但我失败了以下代码;重定向首页
<rewrite>
<rules>
<rule name="Redirect to HTTPS" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{HTTPS}" pattern="^OFF$" />
</conditions>
<action type="Redirect" url="https://{HTTP_HOST}/{R:1}" redirectType="SeeOther" />
</rule>
<rule name="Redirect poo.example.com to poo.example.com/home.ashx" patternSyntax="ECMAScript" stopProcessing="true">
<match url="(./)" />
<action type="Redirect" url="https://{HTTP_HOST}/home.ashx" />
</rule>
</rules>
</rewrite>
我在IIS 7.5上。
注意
我厌倦了使用默认的文档,但没有奏效。我的应用程序是一个asp.net mvc应用程序。这可能与此有关,但这不是一个问题。我需要使用IIS URL重写功能来实现这一点。
也许[this](http://stackoverflow.com/questions/278668/is-it-possible-to-make-an-asp-net-mvc-route-based-on-a-subdomain)有帮助吗? –