views:

129

answers:

1

Is it possible to have one asp.net web application that handles requests from two domains via asp.net routing? I need one TLD domain per language version pointing to the same app.

  1. How to set up a route that recognize, if the request is coming from domain1.de or domain2.com?
  2. How to configure the domains DNS for this to work?

Thanks in advance!

+2  A: 

Something like this has been asked before: Is it possible to make an ASP.NET MVC route based on a subdomain?

For your questions:

  1. Your solution would be very similar, just change up the string parsing however you want.
  2. The DNS would be simple, just point all the domains to the same IP (your web server's of course). In IIS if you're hosting one site, simply don't configure host headers on the site at all. If you're using multiple sites, then you'll need to add a host header check for every possible domain...so that IIS correctly routes the request into your app.

If you need more info on host headers, add a comment to this and I can explain further...otherwise explaining other scenarios and such just serves to confuse something that should be simple.

Nick Craver