Forum Moderators: open

Message Too Old, No Replies

IIS Permanent redirect - many domains to one site

Need to get users from many domains to one particular site

         

ravie

11:48 am on Jul 2, 2009 (gmt 0)

10+ Year Member



Hello colleagues,
I would like to ask one thing that I haven't seen previously - just very similar scenarios, but not this one:

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]

marcel

12:00 pm on Jul 2, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I would need to create a site for each of our domains and set permanent redirect to the main one

Almost. :) You can set up a single site with multiple Host Headers and redirect this to the main Site.

This is in my opninion the easiest option for you, you could also look into using Isapi Rewrite or the IIS7 URL Rewriting module.

ravie

12:10 pm on Jul 2, 2009 (gmt 0)

10+ Year Member



Hello, Marcel.
Firstly, thank you for the suggestion :).
This would be easy, but it makes for example the search results resulting into Error (unless I configure Alternate Access Mappings) - and that is what I would like to avoid :) as AAM is limited.
Therefore, I guess it's necessary to use Isapi rewrite? This is the first time I hear about that. Anyway, I am decided to do that if you tell me that this is what I need :)
Kind regards,
Marek.

marcel

12:18 pm on Jul 2, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I've never used Isapi Rewrite myself, so, unfortunately I cannot help you there (although there are others here in the forums that are experienced with it)

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>

ravie

12:21 pm on Jul 2, 2009 (gmt 0)

10+ Year Member



Hi again, Marcel
unfortunately, I am using IIS6, so this is not an option for me.
I will keep searching for the Grail :)
Thanks :)
Marek

encyclo

1:17 pm on Jul 2, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Most reputable domain registrars offer 301 domain redirects using their own servers, so you may not need to manage the canonicalization directly on your server. This may be the best option if you are limited in your options with your IIS installation.