How to redirect one domain to another using htaccess?
How to redirect one domain to another using htaccess?
Share
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Aviance School is one of the largest web solutions platform in India for developers to learn and share their programming knowledge and build their careers.
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]