title: Redirect to a subfolder in Apache virtual host file
body: <p>I have Joomla installed on a webserver running Ubuntu Server 12.04. The Joomla folder is located at /var/www/cms/. </p>
  
  <p>My vhost file at /etc/apache2/sites-enabled/default has the following content:</p>
  
  <pre><code>&lt;VirtualHost *:80&gt;
      ServerName domain.com/
      Redirect permanent / https://domain.com/
  &lt;/VirtualHost&gt;
  
  &lt;VirtualHost *:443&gt;
      ServerAdmin webmaster@localhost
      ServerName domain.com:443
  
      DocumentRoot /var/www/cms
      &lt;Directory /&gt;
          Options FollowSymLinks
          AllowOverride All
      &lt;/Directory&gt;
      &lt;Directory /var/www/cms&gt;
          Options Indexes FollowSymLinks MultiViews
          AllowOverride All
          Order allow,deny
          allow from all
      &lt;/Directory&gt;
  
      (...)
  &lt;/VirtualHost&gt; 
  </code></pre>
  
  <p>At the moment, all the requests to domain.com and anything entered after that like domain.com/example gets directed and processed by Joomla which either redirects to a proper page or returns a custom 404 error. This all works. </p>
  
  <p>Now, I would like to filter all the requests that go to domain.com/subfolder before they get processed by Joomla and redirect them to /var/www/subfolder (instead of my root folder at /var/www/cms/).</p>
  
  <p>I believe  the file in /etc/apache2/sites-enabled/default (seen above) is the right place to define such a redirect, however I have not been able to figure out at what position and how to achieve this.</p>