Forum Moderators: open
We have many (let's say 10) domains, such as www.example.com, www.example.eu, www.exa-mple.com....
We have one internet facing site under www.example.com and I would like to redirect all these domain names to this one, ideally via IIS.
As far as I know (I am new to this), I would need to create a site for each of our domains and set permanent redirect to the main one...but this would be unacceptable (I would have to use Sharepoint's Alternate Access Mappings to ensure functionality of some features, but there's only limited number of sites I can use, about 5).
I would strongly appreciate any magic options i. e. "get all traffic redirected to this IP to one particular website (www.example.com)".
Is that possible?
Thank you :)
Marek, Czech Republic.
[edited by: encyclo at 12:39 pm (utc) on July 2, 2009]
[edit reason] switched to example.com [/edit]
I would need to create a site for each of our domains and set permanent redirect to the main one
This is in my opninion the easiest option for you, you could also look into using Isapi Rewrite or the IIS7 URL Rewriting module.
If you are running IIS7 you could install the IIS7 URL Rewrite Module [learn.iis.net] with the following in your web.config:
<rewrite>
<rules>
<rule name="Redirect to WWW" stopProcessing="true">
<match url=".*"/>
<conditions logicalGrouping="MatchAny">
<add input="{HTTP_HOST}" pattern="^example.net$"/>
<add input="{HTTP_HOST}" pattern="^www.example.net$"/>
<add input="{HTTP_HOST}" pattern="^example.org$"/>
<add input="{HTTP_HOST}" pattern="^www.example.org$"/>
<add input="{HTTP_HOST}" pattern="^example.co.uk$"/>
<add input="{HTTP_HOST}" pattern="^www.example.co.uk$"/>
</conditions>
<action type="Redirect" url="http://www.example.com/{R:0}" redirectType="Permanent"/>
</rule>
</rules>
</rewrite>