title: apache alias and subdirectories
body: <p>I have the following structure</p>
  
  <pre><code>/var/www/mysite/public/
  /var/www/mysite/api/
  </code></pre>
  
  <p>In both directories, .htaccess is set up for rewriting url as follow :</p>
  
  <p>dev.domain.com/example/  => dev.domain.com/index.php?token=example</p>
  
  <p>dev.domain.com/api/example => dev.domain.com/index.php?token=example</p>
  
  <p>My apache conf looks like this</p>
  
  <pre><code>...
  &lt;VirtualHost *:80&gt;
     Servername dev.domain.com
     DocumentRoot /var/www/mysite/public/
     Alias /api/ "/var/www/mysite/api/"
     &lt;Directory "/var/www/mysite/api/"&gt;
         Options Indexes FollowSymLinks
     &lt;/Directory&gt;
  &lt;/VirtualHost&gt;
  ...
  </code></pre>
  
  <p><strong>dev.domain.com/api/</strong> works fine (it calls www/api/index.php) but <strong>dev.domain.com/api/example/</strong> calls the public site (www/public/index.php with the query string token=example).</p>
  
  <p>I thought that the apache directive Alias was redirecting also the subdirectories, which apparently is not the case. Could someone tell me where I am wrong?</p>