Forum Moderators: phranque
I currently have two domains example.com, and example.net
I currently have the following mod rewrite to solve my problem hopefully...
=================
RewriteEngine On
RewriteCond %{HTTP_HOST} ^example\.com
RewriteRule (.*) http://www.example.com/$1 [R=301,L]
RewriteEngine On
RewriteCond %{HTTP_HOST} ^example\.net
RewriteRule (.*) http://www.example.com/$1 [R=301,L]
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.example\.net
RewriteRule (.*) http://www.example.com/$1 [R=301,L]
================
I'm attempting to move the .net to the .com without damaging my current placement in the SE's.
Am I doing this right? I stand to lose a great deal if it's wrong in the SE's.
I just don't have enough experience to know if it's correct, I utilized an example from another post and modified it for myself...
So my real question is:
Will the SE's change all the listings (eventually) to the www.example.com domain name, while eliminating the .net domain name?
Thanks in advance!
You guys ROCK!
Your code as written should redirect requests as you describe. You may need to add the "Options +FollowSymLinks" directive at the top in order to enable mod_rewrite; Try that first if it doesn't work.
However, search engines do what they want to do, so I cannot guarantee that using this code will cure your ranking/listing problems.
You should test the code using a server headers checker [webmasterworld.com], to make sure that each requested page is redirected as desired (I mean test a sample of URLs in each domain, not all URLs), and that the proper 301-Moved Permanently status is returned.
Jim