I'm facing the following challenge:
I am setting up a homepage for our science department using OpenScholar, which is based on Drupal 6. From what I understand, it uses vsites so that many users can create personalized homepages on one OpenScholar installation.
I have set up OpenScholar on my server in the directory /var/www/example.com and it is served using a name-based VirtualHost on Apache2 that replies to the URL "example.com" ("example.com" is just a space holder).
When I created the homepage for my institute it is created at "example.com/example". The problem I am facing now is that I would like anyone calling "example.com" in their browser to end up at "example.com/example" without them even seeing "example.com/example" in their browser, in order to make the vsite my main site for "example.com". But I am not sure how to achieve this.
I have tried using Apache redirects/rewrites and also using the module "path redirect" and "global redirect" in Drupal, but it didn't work.
I would love to hear from someone on how this can be achieved.
------ EDIT ------
The answer by Tom Kirkpatrick did help, but I ran into a new problem. Here the setting I used:
RewriteRule ^$ example/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# RewriteRule ^(.*)$ example/$1
I commented the last line due to the following: When I call example.com, I end up with example.com/example shown as example.com. But I have the problem that internal calls to page such as example.com/example/subpage is not changed to example.com/subpage. So if you continue browsing from example.com to a subpage in the browser you end up seeing example.com/example/subpage and not example.com/subpage, since that is the internal path that Drupal uses. That is also why I needed to comment the last line as this would rewrite example.com/example/subpage to example.com/example/example/subpage which does not exist. Or so I assume, because with it, it is not working. So is there some way to rewrite the path that the user sees in his browser from example.com/example/subpage (the internal path used by Drupal) to example.com/subpage without having to mess with the Drupal settings itself? I.e. to do it completely inside Apache? Thanks again!