How do I Getting the URL in the Address bar?

  • Thread starter Thread starter Jack
  • Start date Start date
Jack,

Can I assume that you are using IIS? The first thing you need to do is
setup you IIS to use host headers tpo direct incomming traffic to the
correct website. So you can setup 2 virtual websites in IIS, each running on
port 80. Then set the host headers for each to your domain names.

You need DNS records as well, but I will assume you already have them setup
?

Since the 2 sites are going to be 2 different applications, you will know
that you are at www.red.com when you get pages from www.red.com and
vice-versa.

Does this make sense?

Steve
 
If I understand your post correctly, you have two DNS names pointing at the
same IP address and you want to know how traffic is being directed to your
site.

Assuming that you already have the site set up and the DNS configured to
point both names to the IP address, you could use:
Request.ServerVariables["SERVER_NAME"]

HTH
 
Back
Top