title: Running 2 drupal sites from 2 different subfolders using .htaccess
body: <p>I have a domain example.com for which I have created two fully separate drupal 8 setup. These two different setups are in two different subfolders under the root, namely, build1 and build2.</p>
  <p>A. I want to translate any url to https automatically.
  B. I want to add www to any url that does not have www, automatically.
  C. When a user accesses the url example.com, I want the request to redirect and open the drupal site that is in the subfolder build1 without revealing build1 subfolder name in the url.</p>
  <p>I have achieved A, B, and C by using the following in .htaccess in the root folder.</p>
  <pre><code>RewriteEngine On
  RewriteCond %{HTTPS} off
  RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
  
  RewriteEngine on
  RewriteCond %{HTTP_HOST} !^www\.
  RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
  
  RewriteEngine on
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteRule ^(.*)$ build1/$1 [L]
  </code></pre>
  <p>My next objective, which I am struggling is, to add instruction in .htaccess so that when I type in example.com/build2 or <a href="http://www.example.com/build2" rel="nofollow noreferrer">www.example.com/build2</a>, it opens up the drupal setup that is in build2.</p>
  <p>I have tried for a while but no luck.</p>
  <p>Thanks in advance .... Mic</p>