Hi,
We're developing a bunch of WordPress websites for clients, each with their own cPanel account on our VPS. Some have current websites and will keep their existing domain for the new site. We know to create 301 redirects for any pages that have a new directory structure compared to the old site's (due to being a CMS now). We did find that in WordPress we couldn't use the simple one line 'Redirect 301 /old.html ...' code, but had to create more complex RewriteRules in the .htaccess file.

Here's the code we had to use:
Code:
RewriteCond %{HTTP_HOST} ^domain.org$ [OR]
RewriteCond %{HTTP_HOST} ^www.domain.org$
RewriteRule ^home\.html http://www.domain.org/ [R=301,L]
RewriteRule ^about\.html http://www.domain.org/about-us/ [R=301,L]
etc....
But we also have clients who are changing their domains as well for the new sites. So their domains AND directory structure will be new. Maybe I'm overthinking it, but do you have to approach this a bit differently?

  1. We can usually park the old domain on the new account (in cPanel) and do a main redirect there. Does this only cover the root? What about subdirectories/files (in a check, those appear to NOT be redirected)?
  2. With the old domain parked on our new domain account, if we do need to create 301 redirects now for the altered page/directory structure, how would the above code need to be alterred?
  3. We're assuming we do need to park the old domain on our new account or place the redirects on the old domain/site's server, correct?!?


And in looking at an existing site with a cPanel parked domain, it looks like this was added to the .htaccess file automatically:
Code:
RewriteCond %{HTTP_HOST} ^domain\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.domain\.com$
RewriteRule ^/?$ "http\:\/\/www\.domain\.org\/" [R=301,L]
Any help here would be greatly appreciated. THANKS!