Redirect one domain to another using .htaccess
Hello friends,
Are you looking for redirecting your website from one domain to another ? I was working for client who has a domain in .com and now they want to move full website into .ie domain. The problem is that all links has been crawled by major search engine. So if we remove all files from .com domain than it shows 404 not found (broken links) for .com domain links. Also we have to remove files to avoid duplicate content issues.
The solution is to redirect all request from .com to .ie. So we need to write rules in .htaccess file of .com domain which redirect all request from .com to .ie and we will not loose the visitors. Below are the rules which is useful for redirecting from one domain to another domain.
Options +FollowSymLinks
RewriteEngine onRewriteCond %{HTTP_HOST} ^www.olddomain.com$ [NC]
RewriteRule ^(.*)$ http://www.newdomain.com/$1 [R=301,L]
Comment below if you have any query.
To know more about programming,JavaScript issues,jQuery,Expression Engine,MYSQL database and Open-source, enter your email address below. We will send you free tutorials.






I am
about 1 year ago
I you use permanent redirection then it will html in SEO else there might be a case of duplicate page.