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.

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:
    1
    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:
    30,814
    Likes Received:
    672
    Trophy Points:
    113
    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.
     
Loading...

Share This Page