Multi-site, single code base IIS7.5 with separate web.configs

Events happening in the community are now at Drupal community events on www.drupal.org.
Posted by Jsan2020 on January 21, 2011 at 7:56pm

My group and I are attempting a multi-site setup using a single codebase with IIS7.5. We have defined a ton of rewrite rules using the awesome built in UI. That has left us with a fully pimped out web.config file in our Drupal root. We have several sites already set up, some with their own databases and some that only exist as translated versions of our main site.

How can use new, clean web.config files for each site that would let us redefine rewrite rules (or create local rules only applicable to an individual site.)

Since all of our sites have the same document root and Drupal's index.php routes them from there they are all using the same set of rewrite rules.

I can see that reading web.config files is hierarchical in nature. If each site has its own document root, there would not be a problem.

Our current setup:

d:\drupal
web.config
 sites\
 all\
 files\
 modules\
 themes\
 sitea\
 files\
 settings.php
 siteb\
 files\
 settings.php

Any help would be appreciated, thanks.

Comments

Create multiple document roots

Posted by ben.bunk on January 21, 2011 at 10:02pm

Create multiple document roots as either virtual apps or as full fledged sites and then create a symlink just like in linux/unix to point to the drupal core.

For example:

Drupal core is installed in C:\drupal

Your sites are installed in C:\sites\a,b,c ... etc

Create the symbolic link for the drupal files: mklink /D drupal C:\drupal

Setup a rewrite rule to remove the drupal folder name from your paths to make www.sitea.com/drupal/index.php -> www.sitea.com/index.php and your good to go.

Will try this

Posted by Jsan2020 on February 3, 2011 at 2:13am

Thanks for the reply.

By symlinks you mean junction links for Windows?

I don't think a junction is

Posted by ben.bunk on February 3, 2011 at 12:14pm

I don't think a junction is needed. Here is the technet section on mklink - http://technet.microsoft.com/en-us/library/cc753194(WS.10).aspx

Drupal on Windows

Group organizers

Group notifications

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

AltStyle によって変換されたページ (->オリジナル) /