How to redirect one domain to another using htaccess?

How to redirect one domain to another using htaccess?

Team Leader Asked on June 13, 2017 in TECHNOLOGY.
Add Comment
1 Answer(s)

Add the following code to your .htaccess file and upload in the root of your domain.com


RewriteEngine On

RewriteCond %{HTTP_HOST} ^www\.domain\.com$

RewriteRule (.*) http://www.new-domain.com/$1 [R=301,L]

Team Leader Answered on June 13, 2017.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.