views:

80

answers:

1

I need to have 2 domain names that will basically be the same application but with a different theme or skin. I know I can check for the domain name using Server Variables, but how do I point both domains to the same application? And do I develop this like a regular site (with the exception of theming?) Do I just make a regular "Web Site Project"? Also, I only have access to my local dev machine now (http://localhost), not the domains, so how do I go about testing and setting this up? Thanks!

+3  A: 

You would do it in IIS. Your DNS would point both domains to the same machine, then inside IIS headers, you put both domain entries.

As to handling it from a code perspective, you could use the Request (HttpRequest.Url) object to determine which of the two sites are being visited and dynamically change whatever settings are site specific.

Edit. Oops, missed the bit about testing. Well, you best bet is to put two entries in your HOSTS file with your domain name. Edit the file c:\windows\system32\drivers\etc\hosts and add the following line

fakedomain1.com 127.0.0.1

fakedomain2.com 127.0.0.1

EDIT2: Unmarked ninja edits are annoying.

Serapth