This is the multisite set up we use with "T" managing the server files and "M" managing files from the drupal folder down:
To set up a new site using Drupal’s “Multi-site” capability:
- T sets up new database (if necessary)
- T sets up an Apache alias for /foo
- M adds a block of RewriteCond/RewriteRule to /.htaccess*
- M adds sites/mainurl.foo folder (e.g. drupal.www.myedu.edu/.../foo)
- M adds settings.php file to the new folder from (4)
- M notifies T that it’s ready, T kicks Apache to recognize new Alias from (2)
(*) The RewriteCond/RewriteRule block looks like this:
# For: /foo
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteCond %{THE_REQUEST} ^/foo/
RewriteRule ^(.*)$ foo/index.php?q=$1 [L,QSA]
These all need to be *above* the default RewriteCond/RewriteRule block, which should be the last few lines of the file above :
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
No comments:
Post a Comment