Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

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:
    4
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. cPanelPeter

    cPanelPeter Technical Analyst III
    Staff Member

    Joined:
    Sep 23, 2013
    Messages:
    575
    Likes Received:
    20
    Trophy Points:
    93
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice