title: htaccess redirect URI to parent directory
body: <p>I have a website hosted in <code>/var/www/thesite</code> (apache server), it's a <code>Symfony2</code> website so inside this folder I have a <code>web</code> folder to which my virtual host is pointing.</p>
  
  <p>So my virtualhost is <code>www.mysite.com -&gt; /var/www/thesite/web</code></p>
  
  <p>In this web folder I have a <code>.htaccess</code> to format URL nicely.</p>
  
  <p>Now, I've added an API in <code>/var/www/thesite/api</code>, the API is implemented using <code>Silex</code>.
  I want to redirect all request <code>http://www.mysite.com/api</code> to this new framework.</p>
  
  <p>So I've added in <code>/var/www/thesite/web/.htaccess</code></p>
  
  <pre><code>RewriteCond %{REQUEST_URI} ^/api
  RewriteRule ^api(.*)$ ../api/web/index.php [NC,QSA,L]
  </code></pre>
  
  <p>But I get:</p>
  
  <blockquote>
    <p>Bad Request</p>
    
    <p>Your browser sent a request that this server could not understand.</p>
  </blockquote>
  
  <p>I'm not sure if I can access parent folder in the <code>.htaccess</code>. I don't want to change my virtualhost target directory to avoid security breach.</p>
  
  <p>How can I solve this issue?</p>