different domain names are directed to my IIS 4.0 IP address. they all reach the same asp file. each one of the has to be treated differently.
how can i know in the asp code, the domain that was requested by the user?
Set up different web sites in IIS, each on a different port (i.e. not port 80). Each site then does a re-direct to your real home page. You can then look in the referring page property of the request object to see where it came from.
Only downside is some clients running behind a firewall aren't going to be able to open a non-port-80 site.
Didn't understand? are you hosting different domains on one phisical web site? that means hosting a site with multiple header URL, try to create a site for each domain in IIS ,make them all redirections to your asp file but add at the end of the redirection url a query variable like:
main.asp?dom=1 .. for each domain give it different value,
now in the asp type:
request.querystring("dom"
selecte case dom
case 1
'performe actions for domain 1 like
response.redirect("domain1.asp"
case 2
...domain 2 actions
case else
'if not coming from any domain
response.write"You came here by mistake, get lost!.. Shuu! ) "
end select
i'm affraid this doesn't help me.
I don't want (and can't, for various reasons) to create virtual servers in either of the two ways suggested ("create a site for each domain" or "Set up different web sites in IIS, each on a different port".
i want to solve this without changing the IIS architecture.
Hmmm.. not possible then.. you cant! there are things that cant be done other ways! you can try in a way to fetch the header server variable request.servervariables("All-Http" and try to get in it the header the client's request header.. but this is more difficult.. browsers send different headers..
try it Silvers5
As seen on EE
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.