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.

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:
    1
    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:
    18
    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!!!
     
  3. facelikebambi

    facelikebambi Registered

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

    arunsv84 Well-Known Member

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

    Cheers!!!
     
Loading...

Share This Page