Results 1 to 7 of 7

Thread: domain name redirection...

  1. #1

    Thread Starter
    Fanatic Member chrismitchell's Avatar
    Join Date
    Jan 2001
    Location
    With Hobbes in New Zealand
    Posts
    568

    domain name redirection...

    I have been trying to think about how to do this for the entire weekend but to no avail....

    I have 3 domain names going to the same server all of the sites are stored on... unfortunately they all currently goto the same splash page.. I need a piece of code to be able to recognise which domain has been typed in and for it to load a certain image (the logo for the company) into a space.. To see the site I am doing this for it is : www.mmr-international.com.

    Any ideas on how this may be possible?

    Cheers for all your help.

  2. #2
    Black Cat JoshT's Avatar
    Join Date
    Nov 2000
    Location
    WNY, USA
    Posts
    4,032
    I think its the HTTP_HOST CGI variable. If not, use your favorite CGI language to loop thru all available CGI /Environmental variables -- the hostname they requested should show up there somewhere.
    Josh
    Get these: Mozilla Opera OpenBSD
    I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.

  3. #3

    Thread Starter
    Fanatic Member chrismitchell's Avatar
    Join Date
    Jan 2001
    Location
    With Hobbes in New Zealand
    Posts
    568
    How do I do that? Does this need to be done Server side? If so should I ask the server person (the guy who looks after the server) to set it up for me?

  4. #4
    Black Cat JoshT's Avatar
    Join Date
    Nov 2000
    Location
    WNY, USA
    Posts
    4,032
    Yeah, newer versions of IIS or Apache can be configured to host multiple domains. Its part of HTTP 1.1, I think. If you can have your server guy configure it, it's probably better than a code solution.
    Josh
    Get these: Mozilla Opera OpenBSD
    I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.

  5. #5
    Frenzied Member sebs's Avatar
    Join Date
    Sep 2000
    Location
    Aylmer,Qc
    Posts
    1,606
    in asp:

    Request.ServerVariables("HTTP_REFERER")

    try this!!

    do a response.write of it(just to test),

    try with your 3 different url!!

    i'm pretty it will work!!

  6. #6
    scoutt
    Guest
    excuse me if I am a little slow on this but, you have 3 sites on teh same server and they have the same splash screen. so when you goto that splash screen you want to pick what site it is for?


    when I click on the link above, is tha tthe splash screen or the next one is the splash screen.

    sorry chris but I was a little cornfused

  7. #7

    Thread Starter
    Fanatic Member chrismitchell's Avatar
    Join Date
    Jan 2001
    Location
    With Hobbes in New Zealand
    Posts
    568
    Thats ok Scoutt.. I had to eventually tell the server guy to do it on IIs on the server as it couldn't be done properly -- or at least I didn't know how to do it. Thanks for all your help

Posting Permissions

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



Click Here to Expand Forum to Full Width