Reputation: 1130
I am looking to one domain to another with all sub-urls as well. The original url would be ehanceinsdev.com and the redirected url would be www.enhanceinsurance.com. I would want it so that enhanceinsdev.com/foo would go to www.enhanceinsurance.com/foo.
Thanks for your help!
Upvotes: 2
Views: 1060
Reputation: 24448
Try
Options +FollowSymLinks
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^ehanceinsdev\.com$ [NC]
RewriteRule ^(.*)$ http://www.enhanceinsurance.com/$1 [R=301,L]
Upvotes: 0
Reputation: 784938
You can use this simple rule in your DOCUMENT_ROOT/.htaccess
file:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^enhanceinsdev\.wpengine\.com$ [NC]
RewriteRule ^ http://www.enhanceinsurance.com%{REQUEST_URI} [R=301,L,NE]
Upvotes: 2