I'm looking for some help with rewrite rules and multisite. I would like to have the following set up:
- The "Main" Drupal site, hosted at www.example.com and with all of its modules and themes at /sites/example.com
- A "Sub" Drupal site, hosted at www.example.com/subsite and with all of its modules and themes at /sites/example.com.subsite
So far #1 works beautifully with the following rewrite rule:
location / {
root /www/example;
index index.php index.html;
if (!-e $request_filename) {
rewrite ^/(.*)$ /index.php?q=$1 last;
break;
}
}
I haven't been able to get #2 working, though. I've tried many different rewrite rules, most of which give me a "404" or "no input file specified. I was thinking it would be something like:
location ~^ /subsite/ {
root /www/example;
rewrite ^/subsite/(.*)$ ^/index.php?q=$1 last;
}
but that doesn't seem to work.
Any pointers out there?