How to redirect to a new domain and keep the URL intact?

eberkund

Well-known member
I have moved my site over to a new domain and wanted to know what the best way to direct traffic from the old domain would be. I have been trying to get this to work (in my .htaccess file) without any luck...

Code:
RewriteCond %{HTTP_HOST} ^campforums.net$ [NC]
RewriteRule ^(.*)$ http://campingbabble.com/$1 [R=301,L]

I think the problem in the DNS setting for my old domain I just have a redirect record which I don't think is right but I'm not exactly too sure what I should have there instead.

Thanks
 
I have moved my site over to a new domain and wanted to know what the best way to direct traffic from the old domain would be. I have been trying to get this to work (in my .htaccess file) without any luck...

Code:
RewriteCond %{HTTP_HOST} ^campforums.net$ [NC]
RewriteRule ^(.*)$ http://campingbabble.com/$1 [R=301,L]

I think the problem in the DNS setting for my old domain I just have a redirect record which I don't think is right but I'm not exactly too sure what I should have there instead.

Thanks
Why are you setting a redirect record. Just point it at your server IP like normal and use the re-write in .htaccess to redirect it there.
I have about 6 domains pointed all to one and just use the nginx rewrite to map it to sayapple.com. All the domain entry IP's point to the same IP.
 
Top Bottom