Redirect from one website url to another url

You can redirect website url to another url using .htaccess file. write following code into .htaccess file and put this file into root folder of your old website. This code is tested at apache server on linux hosting. RewriteCond %{HTTP_HOST} ^http://www.oldwebsite.com [NC] RewriteRule ^(.*)$ http://www.newwebsitedomain.com/$1 [L,R=301] RewriteCond %{HTTP_HOST} ^www.oldwebsite.com [NC] RewriteRule ^(.*)$ http://www.newwebsitedomain.com/$1 [L,R=301]