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!

URL redirect

Discussion in 'General Discussion' started by kayyy, Apr 3, 2014.

  1. kayyy

    kayyy Active Member

    Joined:
    Mar 12, 2014
    Messages:
    32
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    DataCenter Provider
    Hey,

    i`ve a maindomain and a addon domain.

    My folders are:

    - public_html
    -> maindomain
    -> addon domain

    How can i say redirect the maindomain to the folder "maindomain" ?
     
  2. gopkris2005

    gopkris2005 Well-Known Member

    Joined:
    Jan 9, 2007
    Messages:
    64
    Likes Received:
    0
    Trophy Points:
    156
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Twitter:
    You can change main domain document root to "maindomain" folder in your httpd.conf virtual host entries.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. kayyy

    kayyy Active Member

    Joined:
    Mar 12, 2014
    Messages:
    32
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    DataCenter Provider
    thanks for your reply.

    where can i find my httpd.conf in cpanel ?
     
  4. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,827
    Likes Received:
    1,898
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello :)

    You can modify the document root for a domain name by editing the "documentroot" entry in the appropriate cPanel user data file:

    Code:
    /var/cpanel/userdata/$username/$domain.com
    Then, rebuild the Apache configuration file via:

    Code:
    /scripts/rebuildhttpdconf
    Thank you.
     
    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