I have a website that I basically redesigned, and I got a new domain for it. So I want to redirect the traffic from the old site to the new site's homepage. I messed around with domain forwarding, but that seems to only direct the homepage of the old site to the new site.
Assuming your server runs apache, type the following in .htaccess file on the root (public_html, etc) folder : Replace olddomain,newdomain,.com with appropriate values. RewriteEngine On RewriteCond %{HTTP_HOST} ^olddomain\.com$ [NC] RewriteRule ^(.*)$ http://www.newdomain.com [R=301,L] Code (markup): Let me know if it works
I have a similar issue that i hope you can help me with. I moved a domain that I had, http://www.mydomain.com to a sub domain and it is now http://abc.mydomain.com. I would now like to redirect any calls to specific pages like http://www.mydomain.com/page1.html to http://abc.mydomain.com/page1.html. I do have access to my .htaccess files and can edit them if that's what's needed. Thanks to anyone that can help.