Results 1 to 2 of 2

Thread: request.servervariables(

  1. #1
    Join Date
    Dec 1969

    Default request.servervariables(

    Hello,<BR><BR>I am setting up a site which will have multiple domains coming to one IP address, as many as a couple of hundred different domains. I need to determine which domain that the user has come from so that I can redirect the user to a particular section of the main site. I am going to be using the statement domain=request.servervariables("http_host") to retieve the originating domain. Is this the correct syntax, and will I ALWAYS ALWAYS ALWAYS retrieve the originating domain name as opposed to the originating IP Address or nothing? Obviously if I were to receive the IP Address, or nothing at all, I would have no way of telling which one of the hundreds of domains the user came from!<BR><BR>Thanks for any help in advance!<BR>JW

  2. #2
    Rokea Guest

    Default RE: request.servervariables(

    I dont know what you are exactly planing to do as a web page, but for my part, i dont like relying on the http_host value for the IPAddress. In some particularsituations, you wont get the thing you would want from that variable.. A way to do this would be through a DB with a login system. This way your redirects would be bases on a particular user, and not on a particular address (e.i.:what if a user is viewing your site from a different computer than the one he has at home?? IP changes..)<BR><BR>That being said, if your site is a personnal site.. the http_host could be a not so bad option.. more so if you cant afford a DB.<BR><BR>Hope this helps<BR><BR>Rokea

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts