views:

2027

answers:

2

How should I configure the URL Rewrite Rule in IIS7 to redirect my aditional domains ( domain.net, domain.org, domain.info) to the principal .com domain?

+1  A: 

In IIS7, you can use the new command “appcmd.exe” to enable redirection as following:

%windir%\system32\inetsrv\appcmd set config "Default Web Site/" -section:system.webServer/httpRedirect -enabled:true -destination:"http://domain.com"

This tells IIS to redirect all request sending to the virtual application “/” to “http://domain.com”. The actual result is that appcmd.exe adds the following section to the web.config file for “/”:

web.config of your domain.net

<system.webServer>

    <httpRedirect enabled="true" destination="http://domain.com" httpResponseStatus="Permanent"/>

</system.webServer>
simplyharsh
A: 

You can use the GUI to setup a redirect in IIS7 per this post.

notandy