301 / Canonical Problem - Quick Help

Laubster

Senior Member
Joined
May 21, 2013
Messages
1,008
Reaction score
383
Hey everyone. My GF wants to transfer her WP site from www.domains.com (plural) to another domain she owns: www.domain.com (singular). I know how to clone sites, but don't quite understand how to do this so that all the old URL's points to the new URL's. Can I edit the htaccess file on the old site so that all URL's are 301'd to the new site properly? And if so, can you copy/paste the code here or point me in the right direction please?
 
Try this in your htaccess file. Should redirect all old pages to new pages:

Code:
RewriteEngine on
RewriteCond %{HTTP_HOST} !^www\.newdomain\.com
RewriteRule (.*) http://www.newdomain.com/$1 [R=301,L]
 
Back
Top