Hi,
Just an update (and thanks for getting back to me). I've been on a two week holiday and got cursed with a horrible flu SO only got back in the office yesterday.
I did manage to sort this however. So to explain the situation - which I failed to do thoroughly first time round.
The application is written in Ruby on Rails (which has it's own server named WEBrick that serves the app on port 3000 by default) and is being server by Apache via a mod named Phusion Passenger. Passenger makes serving Rails apps via Apache much less of an hassle than many other solutions.
Now Rails has internal 'routes' that defines the paths, for instance:
example.com/site1/home
example.com/site2/search/listings/4572346
So as soon as example.com gets hit the content gets served by WEBrick via Apache and everything after example.com (for instance ^/site1/home) is not physical, neither a regular query string, but a Rails route, hence my confusion on how to handle it with mod_rewrite.
The odd thing is I ask a few times on the rails and passenger IRC channels but no one seemed to know the answer.
So what one would usually do to have:
http://siteone.com/siteone/home
display as:
http://siteone.com/
would be:
RewriteRule ^/$ /siteone/home [L]
Which gave me a server error. So what worked, and I should have thought if it immediately, was to add the proxy flag and have mod_proxy handle it :)
RewriteRule ^/$ /siteone/home [P,L]
I hope this can help someone with the same question in the future.
Cheers,
Charl