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!

accessing root-level from addon domain

Discussion in 'General Discussion' started by mikabee, Jun 15, 2016.

  1. mikabee

    mikabee Registered

    Jun 15, 2016
    Likes Received:
    Trophy Points:
    cPanel Access Level:
    Website Owner
    I have recently purchased 4 domains and a webhotel running cPanel. I have been able to configure it so that one of the domains is the primary one and 3 others as addon domains using subfolders. This is the desired setup to have them as separate sites and not as subdomains. So the folder structure is like this:
    - /public_html/index.html (frontpage of main domain)
    - /public_html/addon1/index.html (frontpage of first addon domain)
    - /public_html/addon2/index.html (frontpage of second addon domain)
    - /public_html/addon3/index.html (frontpage of third domain)
    - /public_html/common/ (shared resources)

    However, all of the sites/domains share some common resources like images, scripts and other libraries. Instead of copying and maintaining same files in 4 locations, I would like to use them from a shared folder in the root folder. For some reason it does not work. If I have in my html-code references like "<img src='/common/image1.jpg>' it works only for the main domain but not for the addon domains. There is no error messages, only the image (or other resources) are not loaded.

    How can this be achieved/configured with cPanel?
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Apr 11, 2011
    Likes Received:
    Trophy Points:
    cPanel Access Level:
    Root Administrator

    This seems like an issue with your HTML coding. Try using the full path to the image (e.g. /home/$username/public_html/common/image.jpg) to see if that makes a difference.

    Thank you.
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...

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