Redirections and Forwardings?

Discussion in 'Domain Names' started by abcdefGARY, Dec 21, 2006.

  1. #1
    Hello, I've tried many times to do what I want to do but it doesn't seem to work.

    Right now, I have two domains in which both are hosted on the same hosting account. So, for example, animals.com and humans.com are hosted on the same folder. So if I type www.animals.com/animals.htm, it will show up the same page as www.humans.com/animals.htm.

    Basically, I'd like to know how to redirect properly if I want animals.com leads to the animals.com/index.htm page, while humans.com will lead to humans.com/humans.htm or animals.com/index.htm page.

    Since both of these domains are hosted on the same hosting account, I'm quite stumped on how to accomplish this. Or maybe I am just too much of a beginner. Thanks in advance for any help and I'd be happy to give some rep if we come to an answer.
     
    abcdefGARY, Dec 21, 2006 IP
  2. ehlokoen

    ehlokoen Peon

    Messages:
    161
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #2
    If you got php you should check something with request uri (from which url they came to visit your site) so that if its animals.com they'll redirect to animals/index.htm(l) and else to humens/index.htm(l)

    Not tested, but something in this direction should do it. It has something to do with checking the host part of the url...
     
    ehlokoen, Dec 21, 2006 IP
  3. abcdefGARY

    abcdefGARY Well-Known Member

    Messages:
    665
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    110
    #3
    I will insert a question mark.

    ?

    haha, sorry. I'm not sure what you're trying to explain to me.
     
    abcdefGARY, Dec 22, 2006 IP
  4. ehlokoen

    ehlokoen Peon

    Messages:
    161
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #4
    The visitor types in either humans.com or animals.com. And will be redirected to index.html. Instead, use index.php and use PHP to check with the URL was for requesting this page, for example humans.com or animals.com

    If you got that information you can use an if statement and redirect your vistors to the appropriate place :)

    Hope this is better :confused: ?
     
    ehlokoen, Dec 22, 2006 IP
  5. abcdefGARY

    abcdefGARY Well-Known Member

    Messages:
    665
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    110
    #5
    It's okay. I got GoDaddy to explain how to do it for me. Apparently I needed to place both of the domains in separate folders...

    doh. thanks anyways.
     
    abcdefGARY, Dec 23, 2006 IP