In the install.txt u've explained how to set a site to mydomain.com/site/. I want to create it as subdomains, like .mydomain.com. There are 2 situations again:

1) I am on a shared server so I can't change VistualHosts... all I have is .htaccess

2) Also help me set the same in a windows environment.... my testing server is windows.

Thanks in advance.

Comments

schuyler1d’s picture

If it's ok that the sub-sites have all the same modules (including multisite manager) as the main site, then your situation is much easier. In that case, do the following:

  1. no rewrite rules, no symlink
  2. In your ./sites directory add the special settings.php file to a directory called "mydomain.com"
  3. Either above the conditional clause in the settings.php or as an else{} clause set the db_url, db_prefix, and base_url to the main one.

If you need separate sites directories, then this is trickier. I don't have personal experience with running Apache on Windows, but here is your big issue:
*Even if you get the symlink and the rewrite rules correct, *.mydomain.com is indistiguishable by drupal to mydomain.com in the ./sites directory. (Maybe we should put in a patch for this to core).

Probably the best approach then would be to make rewrite rules that switch any *.mydomain.com's to mydomain.com/site/*. For the symlink, allegedly there's something like symlinks in Windows called JunctionPoints/Reparse Points.
http://shell-shocked.org/article.php?id=284
Maybe these will help?

With the rewrites, you'd then still be able (I think) to do mydomain.com.site in the ./sites directory.

Another way to go is just use rewrite rules to divert to two drupal code bases, and then the different modules only available in mydomain.com's site (like multisite_manager). I know that's ugly.

Even uglier, of course, is just to hack the conf_path() code in includes/bootstrap.inc

Please follow up on what you manage, or other issues.

schuyler1d’s picture

Status: Active » Closed (won't fix)

did you ever get this working?

mcaden’s picture

So following these instructions would make it possible to make a site using /{shortname} instead of /site/{shortname}?