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.

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:
    61
    Likes Received:
    0
    Trophy Points:
    6
    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.
     
  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 Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,830
    Likes Received:
    672
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    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.
     
Loading...

Share This Page