[solved] Seo 301

urs

Well-Known Member
#1
I read a lot in the forum, but it's not clear for me.

What is the perfect way to match my domains with a proper 301 redirection to one page

I have several domainnames:
abcd.ch
www.abcd.ch <<- That is the 'master'
efgh.ch
www.efgh.ch

all to the same content!

Do i have to make a virtual domain for all 4 or one per name?
I read www. will be ignored. What means ignored? Proper for the crawlers?

Where do i put the 301 redirection code?

It would be gret to get a step by step solution for that.

best regards

Urs
 
Last edited by a moderator:

NiteWave

Administrator
#2
using rewriterule can achieve the goal, but not sure if it's the perfect way or not :)

in the document root/.htaccess, add:

RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.domain1\.com$ [OR]
RewriteCond %{HTTP_HOST} ^domain1\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.domain2\.com$ [OR]
RewriteCond %{HTTP_HOST} ^domain2\.com$ [OR]
RewriteCond %{HTTP_HOST} ^domain\.com$
RewriteRule (.*) http://www.domain.com/$1 [R=301,L]
 

NiteWave

Administrator
#4
be sure "FileInfo" is allowed overridden at server and vhost level.

in detail:
Server->General->Allow Override: check FileInfo

Virtual Hosts->your vhost->General->Allow Override: check FileInfo
 
Top