PDA

View Full Version : Drupal Multisite setup


readyforquest
12-25-2007, 07:37 AM
I am trying to install drupal multi site installation.
I have installed drupal in /home/user/public_html/drupal. I am able to go to the index page using "www.domainname1.com/drupal". What can I do to make it access using "www.domain1.com"? I know how to do this using vhost entries. But bluehost does not allow access for httpd.conf file or any other vhost related files.

I setup the directory structure for multi-sites in /sites directory also. So, I am able to go to www.domainname2.com/drupal.
I have added the second domain as a parked domain. Maybe I could do an addon domain too(where I can choose the document root), but I see that many use the parked domain solution. So I just tried it.

I am not sure how it can be achieved using .htaccess re-write. Has anyone tried this before?

Basil
12-25-2007, 11:08 AM
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) /drupal/$1 [l]
RewriteRule ^index.html$ /drupal/

Just change index.html to whatever the index file on your site is called.

readyforquest
12-26-2007, 08:18 PM
Thank you very much for your response. But looks like even using this approach, I am unable to mask the directory 'drupal' from the users. I want to hide the details of the software powering the website for security reasons. I think I am only left with the option to install drupal in /public_html instead of /public_html/drupal.

Wish I had access to httpd.conf file or vhost file to set the server document root for each virtual host as provided at this location.
http://drupal.org/node/169034

readyforquest
12-26-2007, 09:21 PM
I think it is not the rewrite rule that is producing the URL. It is drupal which is generating the URL. So, I just updated the base URL in settings.php as follows for the specific domain.

$base_url = 'http://www.domain.com'.

By default base_url is commented and it includes drupal in the file name URL generated.

Thanks a lot for your help in providing the rewrite rules.