我想要的是將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)有幫助嗎? –