Bathory, I believe it was you that came to my help the last time I posted, so thank you again!
Thank you for pointing out the unnecessary https:
With your changes applied I have been able to get a lot closer to what I have been hoping for, but not quite there. For clarity /3 is the root folder for a drupal install.
With your changes I was able to access the 'appA' directories correctly and domain2.com correctly loaded the Drupal landing page. However the pages that sit within the main part of the site:
www.domain2.com/3/appA
are not accessible. Instead they direct to domain2.com/appA (or are not found - ie domain2.com/post1 should be domain2.com/3/post1)
I navigate to
www.domain2.com and am greeted with the domain2.com/index.php landing page of the Drupal install.
But if i select the link that should direct to 3/appA it instead goes to domain2.com/appA
What I think I need is to be redirected (as opposed to rewritten?) to
www.domain2.com/3 when asking for
www.domain2.com
Then all subsequent requests would be appropriately sent to .com/3/...
My current config is as follows:
RewriteCond %{REQUEST_URI} !^/appA
RewriteCond %{REQUEST_URI} !^/appB
RewriteCond %{REQUEST_URI} !^/3
RewriteRule /(.*) /3/$1 [L]
This allows me to navigate to the .com/appA directory correctly and if I manually type domain2.com/3 to then navigate to all the Drupal pages correctly.
However
www.domain2.com now loads the drupal template but the url called is
http://www.domain2.com/index.php/ind....php/index.php
This is slightly better - but obviously I would like the correct page to load! I wonder if an internal .htaccess file on the Drupal install is what is causing the multiple index.php redirects?
Also, is it possible to 'OR' the first RewriteCond like so:
!^/appA|!^/appB|!^/appC (this didn't work, but as I understand it, | is the OR operator in PECL regex.)
Thanks once again for your help - it is greatly appreciated.