title: Flight PHP Routing from Subdirectory
body: <p>So I'm using the Flight PHP microframework (<a href="http://flightphp.com/" rel="nofollow">http://flightphp.com/</a>) to do routing. My question is, how can I run the router from within a subdirectory? What I mean is, essentially, run it 'sandboxed' within a folder.</p>
  
  <p>As in, a request to '/' just pulls the regular index.php file. But a request to '/flight/file' would load the URL using Flight.</p>
  
  <p>I know you can't just dump it in a folder on the server and expect it to work because FlightPHP expects the URLs relative to the root.</p>
  
  <p>Is there a way to run FlightPHP isolated in a directory with the rest of the website running regular PHP?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>I tried simply putting the .htaccess file into the subdirectory. This has the peculiar effect of causing the routes to still act as if they are from the root (e.g. /thing/otherthing/ when it should be /otherdirectory/thing/otherthing/ ) while simultaneously causing the 404 callback to not work. Not what I intended.</p>
  
  <p><strong>EDIT 2</strong></p>
  
  <p>Contents of .htaccess file, which are what is suggested by the Flightphp website:</p>
  
  <pre><code>RewriteEngine On
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^(.*)$ index.php [QSA,L]
  </code></pre>