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!

Part move domain name, keep emails

Discussion in 'General Discussion' started by MarkPW, Jul 7, 2015.

  1. MarkPW

    MarkPW Member

    Joined:
    Jun 8, 2003
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    151
    I want to move/301 redirect all urls, including subdomains on olddomain.com to newdomain.com, but prevent everything in olddomain.com/static/ from redirecting. I also want to keep olddomain.com email accounts active and working.

    My plan is to keep the primary URL in WHM as olddomain.com and add newdomain.com as a parked/alias domain name, and assuming both domains use the same root directory, add rewrite rules to htaccess to 301 any request for olddomain to newdomain except olddomain.com/static/. I also have 2 subdomains I want to redirect, 1 of which uses document root /home/olddomain/public_html/forum/ and the other /home/olddomain/public_html/.

    My question is will this work or is there a better way in cPanel/WHM to achieve this? Will parking newdomain.com work with the subdomains and their respective document roots?

    Thanks for any help.
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,617
    Likes Received:
    1,787
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello :)

    The method you described should work, depending on which Mod_Rewrite rules you add to the .htaccess file. You can add subdomains associated with the parked domain names. Documentation on parked domain names is available at:

    cPanel - Parked Domains

    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