Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I get what domain name a user typed in into a variable

Status
Not open for further replies.

cpuphantom

IS-IT--Management
Jan 8, 2001
58
US
Here's my problem. I have only one IP address to use for the web. And three domain names: and
I want to make an index.asp page that contains only a sinple case statement to redirect to different pages with different site designs based on which domain name the user went to. I would use request.ServerVariables("url") but that only seems to return everything after the domain name.... so if you went to it only returns /index2.asp, and I want it to return the whole thing.

My case statement would look like this:

url = (whatever code I need)
select case url
case " redirect "index2.asp"
case " redirect "/ilneco/"
case " redirect "/phantomatrix/"
end select

What is the code I'm missing to feed the entire site address whatever it may be into the variable "url"?? Thanks for any help.
 
Nevermind... I figured it out: request.ServerVariables("server_name")
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top