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!

How to redirect subdirectories of main domain?

Discussion in 'General Discussion' started by facelikebambi, Mar 20, 2013.

  1. facelikebambi

    facelikebambi Registered

    Joined:
    Oct 9, 2007
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    51
    Hi

    I have several addon domains, so have several subdirectories like this: /public-html/addon-domain.com

    I have redirected my main domain to another URL, but visiting main-domain.com/addon-domain.com still loads the addon domain site under that URL. Visitors have been quoting this URL to me, so it must be getting indexed by Google :(

    How do I permanently redirect main-domain.com/addon-domain.com to go to addon-domain.com instead?

    Thanks!

    Jason
     
  2. arunsv84

    arunsv84 Well-Known Member

    Joined:
    Oct 20, 2008
    Messages:
    373
    Likes Received:
    1
    Trophy Points:
    68
    Location:
    127.0.0.1
    cPanel Access Level:
    Root Administrator
    You can just place a .htaccess rule to redirect the addon domain.

    Use the following simple rule.

    Make sure to add the rule in the .htaccess of main public_html directory.

    Cheers!!!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. facelikebambi

    facelikebambi Registered

    Joined:
    Oct 9, 2007
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    51
    Works great - many thanks!
     
  4. arunsv84

    arunsv84 Well-Known Member

    Joined:
    Oct 20, 2008
    Messages:
    373
    Likes Received:
    1
    Trophy Points:
    68
    Location:
    127.0.0.1
    cPanel Access Level:
    Root Administrator
    Glad I could help.

    Cheers!!!
     
    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