3
如何在IIS7中配置URL重寫規則以將我的域名(domain.net,domain.org,domain.info)重定向到主域.com域?使用IIS7重定向其他域到主.com域重寫模塊
如何在IIS7中配置URL重寫規則以將我的域名(domain.net,domain.org,domain.info)重定向到主域.com域?使用IIS7重定向其他域到主.com域重寫模塊
在IIS7,您可以使用新的命令「Appcmd.exe的」啓用重定向如下:
%windir%\system32\inetsrv\appcmd set config "Default Web Site/" -section:system.webServer/httpRedirect -enabled:true -destination:"http://domain.com"
這告訴IIS重定向所有請求發送到虛擬應用程序「/」到「http://domain.com」 。實際的結果是,Appcmd.exe的添加以下部分爲「/」的web.config文件:
您domain.net的web.config文件
<system.webServer>
<httpRedirect enabled="true" destination="http://domain.com" httpResponseStatus="Permanent"/>
</system.webServer>
您可以使用GUI設置重定向在IIS7中每[this](http://www.trainsignaltraining.com/windows-server-2008-http-redirection/2008-03-27/)發佈。 – notandy 2009-02-23 21:42:06