[英]Is there way to redirect URL from one domain to new domain using IIS URL rewrite module?
我們的系統中總共有兩個域可用。 一個是“example”,另一個是“exe”,我們希望將所有請求從“exe”域重定向到“example”域。 我們想要執行完整的 URL 重定向。 例如,如果我試圖訪問“https://exe.test.dir.com/xyz/ref?function=view”,那么它應該只將 URL 中的域“exe”替換為“example”而不影響其他查詢字符串網址。
嘗試使用此規則
<rule name="rule">
<match url="(.*)" />
<conditions>
<add input="{HTTP_HOST}" pattern="exe.test.dir.com" />
</conditions>
<action type="Rewrite" url="https://example.test.dir.com/{R:0}" />
</rule>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.