1. Rewrite All URLs on one domain to new domain
Put the following code in the .htaccess file of your old domain
Options +FollowSymLinks
RewriteEngine on
RewriteRule (.*) http://www.newdomain.com/$1 [R=301,L]
2. Rewrite non-www urls with www
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^example.com
RewriteRule (.*) http://www.example.com/$1 [R=301,L]
About Bhupendra Kunwar