Multiple sites with host who advertises Host UNLIMITED Sites

Using a single web hosting account to host multiple sites

Multiple sites with host who advertises Host UNLIMITED Sites

Postby gene11 » Sat May 31, 2008 7:52 am

Hi. I signed up with a webhost who advertised "Host UNLIMITED Websites" with the package i purchased. After conflicting answers I am finally told it can only be done through mod_rewrite. currently my sites show up like this: site2.com and site1.com/site2.com. obviously google and such would not be kind to that. don't want to do something that will flag a problem to them. These are 2 different websites. Would appreciate help with this. Thanks.
gene11
 
Posts: 2
Joined: Sat May 31, 2008 7:30 am

Postby richardk » Sun Jun 01, 2008 10:19 am

Do you have some mod_rewrite already running from your host?
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am

Postby gene11 » Sun Jun 01, 2008 8:56 pm

no. they sent me to this site to figure it out. without the proper code i will get site1.com/site2 along with site2.com. that would probably hurt me with the search engines on both sites.
gene11
 
Posts: 2
Joined: Sat May 31, 2008 7:30 am

Postby richardk » Tue Jun 03, 2008 1:46 pm

So when you go to site2.com you get the correct page?

Try the following in site1.com's document root
Code: Select all
Options +FollowSymLinks

RewriteEngine On

RewriteCond %{HTTP_HOST} ^(www\.)?site1\.com$ [NC]
RewriteRule ^(site2\.com)(/(.*))?$ http://www.$1/$3 [R=301,L]

If you want to add it for another site (site3.net) you add it into the () with site2.com, separating them with a |, eg. ^(site2\.com|site3\.net)(/(.*))?$.
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am


Return to Domain Handling

Who is online

Users browsing this forum: Google [Bot] and 19 guests

cron