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.

Serving content of a subdomain when visiting another domain

Discussion in 'General Discussion' started by qtriangle, May 15, 2014.

  1. qtriangle

    qtriangle Registered

    Joined:
    May 15, 2014
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    I have a sub-domain test.abc.com and it has some content/scripts etc available in its sub-domain root.
    I have a client who has domain xyz.com
    How can I show content of test.abc.com to someone visiting xyz.com, without him knowing he is actually accessing the sub-domain's content?
     
  2. JasMax

    JasMax Member

    Joined:
    Jan 26, 2014
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hello qtriangle,

    You can use Domain masking with index page for the domain xyz.com and mask it for test.abc.com.
     
  3. cPanelPeter

    cPanelPeter Technical Analyst III
    Staff Member

    Joined:
    Sep 23, 2013
    Messages:
    569
    Likes Received:
    15
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello,

    Here is the code I used in the past to cload/mask a url. It uses frames (the only way to actually do this that I'm aware of).

    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
    <html>
    <frameset rows="*">
    <frame src="http://www.domain_to_forward_to.com" frameborder="0">
    <noframes>
    <p>This frameset document contains:
    <ul>
    <li><a href="http://www.domain_to_forward_to.com">http://www.domain_to_forward_to.com</a>
    </ul>
    </noframes>
    </frameset>
    </html>
    
    Put the above in index.html (or index.php) and save it in xyz.com public_html folder.
    Obviously change the "www.domain_to_forward_to.com" to the URL you want to forward to.

    Hope that helps.
     
Loading...

Share This Page