Redirect all pages from one domain to another
Put this code in your .htaccess
under DOCUMENT_ROOT
directory before your regular wordpress code:
RewriteCond %{HTTP_HOST} ^(www\.)?domain1\.com$ [NC]RewriteRule ^ http://domain2.com%{REQUEST_URI} [R=301,L]