Hi,
I've been struggling to find the answer to my question for days - can anyone help me - using simple  terms PLEASE?
I have 4 domain names all on the same web host, 1 which is in the / directory I want to keep as is. I have another sub directory which has another index page in it, and my web host points my 3 other domains to it - so identicle content (at the time I thought it was a good idea to have a few domain names :-(
Well now I find out that duplicate sites / content is bad so I apparently need to 301 permanent redirect 2 of them.
There is lots of info on the web but none showing how to do it in my situation, ie the three domain names all pointing to the same index file.
I did find something that appeared to fit the bill and you can see it below
is it correct?
so do I just have to put that in the .htaccess file and put it next the the index file? and do it twice (once for each domain I want to redirect) in the same .htaccess file with a blank line in between?
Here's the code and the writing that was with it
REALLY appreciate any help you can give
If both olddomain and newdomain point to the same server filespace, then you will need to tell this rewrite rule not to redirect newdomain to itself, which it will do unless told otherwise.
Options +FollowSymLinks
RewriteEngine on
#
RewriteCond %{HTTP_HOST} !^www\.newdomain\.com
RewriteRule (.*) http://www.newdomain.com/$1 [R=301,L]
The added RewriteCond prevent the rule from being applied unless the requested domain is NOT "www.newdomain.com"
|