1
我有2個網址 http://test.mysite.com(1)和 http://test.mysite.com/app(2)IIS URL重寫根僅
我想將請求重定向到(1)〜www.othersite.com 時(2)不shuld被重定向。
是否有可能使用正則表達式重寫url?
br
我有2個網址 http://test.mysite.com(1)和 http://test.mysite.com/app(2)IIS URL重寫根僅
我想將請求重定向到(1)〜www.othersite.com 時(2)不shuld被重定向。
是否有可能使用正則表達式重寫url?
br
是的,可以使用URL重寫模塊。您的規則如下所示:
<rule name="Redirect non app" stopProcessing="true">
<match url="^app(.*)" negate="true" />
<action type="Redirect" url="http://www.othersite.com{REQUEST_URI}" />
</rule>