1
我有两个网站,例如“testsite.ir”和“testsite.com”。因为我知道我的网站在Windows Server 2008,Microsoft-IIS/7.5上。 我如何使用301重定向将用户从.ir重定向到.com? 我可以使用.htaccess文件或我应该使用webconfig?301在IIS上重定向?
我使用的代码波纹管在我的webconfig,但没有发生:
<rule name="Redirect from ir to com" stopProcessing="true">
<match url=".*" />
<conditions>
<add input="{HTTP_HOST}" pattern="^www\.testsite\.ir$" />
</conditions>
<action type="Redirect" url="http://www.testsite.com/{R:0}" />
</rule>
任何帮助,将不胜感激!