hosting multiple sites

Events happening in the community are now at Drupal community events on www.drupal.org.
yogarenzi's picture

Does anyone have experience hosting multiple drupal sites from one account? I need some help organizing them, and figuring out some google search issues.

Thanks!

-Renee

Comments

By one account do you mean a

anthonyoliver's picture

By one account do you mean a single drupal code base like a drupal multi-site install? Or do you mean multiple drupal installations under a single hosting account?

I mean multiple drupal

yogarenzi's picture

I mean multiple drupal installations under a single hosting account. When I do google searches for my sites, instead of coming up with the pointed domain, they come up as mybasewebsite.com/myfriendswebsite.com and none of the styling shows up because base url in the settings file points to the pointed domain. For example... http://lookwithpeace.com/pilatescorefit.com/, and http://pilatescorefit.com/ are pointing to the same folder, but appear differently depending on which url you type in. And unfortunately, google finds the first one. I would really appreciate the help. Thanks!

Typically it depends on your

anthonyoliver's picture

Typically it depends on your hosting. Do you know if you have shared hosting? If so does it allow for multi-site. Some host are setup to only allow one domain per site.

it really depends how you're hosting provider sets things up.

Typically you can run multiple drupal installs from one code base.
You will have your
/path/to/drupal/sites/MYWEBSITE.COM/

Each of those sites can have specific modules to them.
In the
/path/to/drupal/sites/all/

Is where you can put modules, libraries, etc. that is shared across all the sites you have running from that single drupal code base.

mod_rewrite rules

muriqui's picture

You should be able to fix that by adding some Rewrite rules on the base domain. So in the .htaccess file in the webroot for lookwithpeace.com, you'd add something like this inside the <IfModule mod_rewrite.c> block:

RewriteCond %{HTTP_HOST} lookwithpeace.com$ [NC]
RewriteCond %{REQUEST_URI} ^/pilatescorefit.com(.*)$
RewriteRule ^ http://pilatescorefit.com%1 [L,R=301]

(That code is just off-the-cuff and untested, so you may have to fiddle with it, but you get the idea.)
Basically, that says anytime the main domain gets a request that starts with pilatescorefit.com, it should redirect to the same path on the pilatescorefit.com domain. The "R=301" in the last line marks this as a "moved permanently" redirect. Eventually, when Google reindexes your site, it'll see that 301 and index the redirected destination instead.

Thanks!

yogarenzi's picture

Thank you so much! I will give that a try. I'm not so good with code, so if cutting and pasting doesn't work, I'll be lost. I would be happy to pay or trade some design work for tutoring sessions if you have some time to spare next week, or the week after. And thank you too Anthony, that looks like a much more efficient way to set it up to begin with.

it worked

yogarenzi's picture

Thanks again, it worked with a few tweaks. I was just a dope and didn't clear my browsing history. Once I did that I saw that it was redirected. Plus you inspired me to learn a little code.

No problem.

anthonyoliver's picture

No problem.

Ann Arbor, Michigan

Group organizers

Group categories

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: