我有一個網站two domains
和one hosting server
,這兩個URL的工作正常。
域名是www.jongeshadi.com
和www.jongeshadi.ir
。
我想當一個用戶輸入www.jongeshadi.ir
重定向到www.jongeshadi.com
。
我Google一下並找到了一些解決方案,如改變網絡配置來:在ASP.NET中重定向到另一個域
<rewrite>
<globalRules>
<rule name="Redirects to www.jomgeshadi.com" patternSyntax="ECMAScript" stopProcessing="true">
<match url=".*" />
<conditions logicalGrouping="MatchAny">
<add input="{HTTP_HOST}" pattern="^jongeshadi.*(ir|com)$" />
<add input="{HTTP_HOST}" pattern="^(www.)?jonsgeshadi.(ir|com)$" />
<add input="{HTTP_HOST}" pattern="^www.jongeshadi.com$" />
</conditions>
<action type="Redirect" url="http://www.domain.ir/{R:0}" />
</rule>
</globalRules>
</rewrite>
但事實並非如此worked.any的事情是錯誤的或者是有其他的解決辦法?
謝謝...
您的IIS服務器上是否安裝了URI Rewrite擴展? – Dai
@戴,我正在使用網站面板,不能完全訪問服務器。我可以怎麼做?我可以問你更多的解釋嗎? –
在DNS中進行更改並將資源保留在Web服務器上。 – Alexander