The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

forward domains to a differenet ip address and different port?

Discussion in 'General Discussion' started by b0072k1, Nov 27, 2005.

  1. b0072k1

    b0072k1 Well-Known Member

    Joined:
    Dec 30, 2004
    Messages:
    133
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Glasgow
    Hi, Im just wondering how can i set up a subdomain set up on my server to connect to a remote computer to a certain port to allow people to connect to this port to access a certain system?

    Any way this can be done at all?
     
  2. hostmedic

    hostmedic Well-Known Member

    Joined:
    Apr 30, 2003
    Messages:
    559
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Washington Court House, Ohio, United States
    cPanel Access Level:
    DataCenter Provider
    ?cPanel dont think would support it - but here is a work around.

    what are you trying to do exactly

    take

    www.domain.com/directory or http://subdomain.domain.com

    and then forward that to www.anotherdomain.com:port#

    the easiest way to do this is to create an index.php file under the domains default directory (or the sub domains default www directory and place the following into it -


    Code:
    
    <?php
    header('HTTP/1.1 301 Moved Permanently');
    header('Location: '.$url);
    
    exit;
    ?>
        
    
    

    in the above you would place http://anotherdomain.com:port# in place of the url -

    ie http://1.1.1.1:2086 (yes you can even use ip addresses

    via dns - not 100% sure that cPanel bind would support it...

    Hope this helps.
     
Loading...

Share This Page