使用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