Ad

Redirecting A WordPress Site 'A' To WordPress Site 'B' Completely

- 1 answer

I created a new WordPress site which is a rebranded version of my old site. It has a new domain and a new design. Apart from that, everything else is same including content and link structure. Now I want to redirect the old links completely. Like the old post, tags, and categories URLs should redirect to the new URLs. How do I do that?

Ad

Answer

Create an .htaccess file in the webroot of the old server and put this in it:

RewriteEngine on 
RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L]
Ad
source: stackoverflow.com
Ad