James
James

Reputation: 1

IIS7 - How do I use the same physical path for different domains?

I have two domains: principal.com copy.com

When someone type copy.com I want the user to see principal.com contents but whithout redirecting him to that domain.

Also if I create a subdomain such as sub.copy.com it will show the content from principal.com. Again, without redirect the user to that domain.

I tried configurating the DNS of copy.com to point to the same IP address of principal.com But I don't know how to configure this domain in IIS7 for use the same physical path as principal.com or If I need to do some other task...

I have done this with apache and the vhost files. Pointing multiple domains to the same DocumentRoot and configurating the DNS to use the same IP ADDRESS... But with IIS7 I don't know how to do it...

How Can I achieve what I want?

Upvotes: 0

Views: 1977

Answers (1)

Chris Young
Chris Young

Reputation: 1809

If you add multiple host headers to the web site (one for each domain), IIS should be able to serve up the same content for both requests.

To do this, click on the site in IIS, in the right hand panel ("Actions"), click on "Bindings..." and there you should be able to enter the different host names.

Upvotes: 1

Related Questions