Domain/Port Redirect

Discussion in 'Site & Server Administration' started by jeeplaw, Jul 25, 2007.

  1. #1
    Has anyone dealt with this before, and have any idea on how to make this work?

    We have an online app that operates three different instances of the application on three different ports :80,280,380.

    What we want to do, to avoid client demo situations where their office locks down certain ports is to have the client come in through a subdomain instead of a direct ip.

    Right now, if their network allows it, they can some in on http://xxx.xxx.xxx.xxx:80

    What we want to setup is http://sub1.company.com, http://sub2.company.com, http://sub3.company.com

    Where subx corresponds to the particular port that the app is running on.

    Any ideas on how to make this work? Is this a mod rewrite scenario?
     
    jeeplaw, Jul 25, 2007 IP
  2. ecentricNick

    ecentricNick Peon

    Messages:
    351
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #2
    If you set up those 3 subdomains, then the user will come to each on port 80. I don't see the benefit to you?

    But, you could then issue a header redirect to the port you want.
     
    ecentricNick, Jul 25, 2007 IP
  3. jeeplaw

    jeeplaw Well-Known Member

    Messages:
    827
    Likes Received:
    31
    Best Answers:
    0
    Trophy Points:
    118
    #3
    jeeplaw, Jul 25, 2007 IP
  4. ecentricNick

    ecentricNick Peon

    Messages:
    351
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Yes, you can do that through htaccess, or though a header send.

    Fact remains though, they'll still all be coming in on port 80 initially because that's what your http listener is listening to.

    http://sub2.company.com is equivalent to http://sub2.company.com:80

    And, in all likelyhood, all three subdomains would be on the same box, and probably virtually hosted. That's why I don't think you get much advantage out of it.
     
    ecentricNick, Jul 25, 2007 IP
  5. jeeplaw

    jeeplaw Well-Known Member

    Messages:
    827
    Likes Received:
    31
    Best Answers:
    0
    Trophy Points:
    118
    #5
    Correct, all three subs are on the same box. We're running a dedicated server for this application and hosting terrabytes of data. So I guess the next question would be "how" to do this in htaccess?
     
    jeeplaw, Jul 25, 2007 IP
  6. ecentricNick

    ecentricNick Peon

    Messages:
    351
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #6
    ecentricNick, Jul 26, 2007 IP