Redirect To Another Host With Query String Htaccess

Redirect To Another Host With Query String Htaccess

If you wish to redirect your current domain, along with its query strings, to another host or domain, you can do so with the following .htaccess code. Just replace www.newdomain.com with whatever domain you wish to redirect to

Options +FollowSymLinks
RewriteEngine On
RewriteRule ^(.*) http://www.newdomain.com%{REQUEST_URI} [R=302,NC]

 

Enjoyed the content ? Share it with your friends !

Leave a Reply

Your email address will not be published. Required fields are marked *