我尝试但未能做到:
<rewrite>
<rules>
<rule name="blog url rewrite">
<match url="(.*)$" />
<conditions>
<add input="{HTTP_HOST}" pattern="mydomin.com/blog" />
<add input="{REQUEST_URI}" pattern="^mydomin/blog" />
</conditions>
<action type="Rewrite" url="cdn.mydomin.com/{C:1}" />
</rule>
</rules>
</rewrite>
任何人都可以帮助我吗?我有asp.net webform应用程序4.5 我想重写:mydomain.com/blog到blog.mydomain.com
答案 0 :(得分:0)
试试这个:
<rules>
<rule name="blog url rewrite" stopProcessing="true">
<match url="blog" />
<action type="Redirect" url="/blog.{C:1}" />
<conditions>
<add input="{REQUEST_URI}" pattern="^/(.*)/blog.*" />
</conditions>
</rule>