title: Converting a very simple htaccess into a PHP router?
body: <p>I'm hoping I can get some help with a relatively simple problem:</p>
  
  <p>I've been programming a PHP application for university and thanks to a complete lack of forethought by me, the servers they are testing our apps on aren't Apache, they are just the <code>php -S</code> servers (PHP built-in server).</p>
  
  <p>So my app relies completely on routing of URIs to one specific file, something I had working well in <code>.htaccess</code>:</p>
  
  <pre><code>RewriteEngine On
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^(.*)$ api.1.0.php [L,QSA]
  </code></pre>
  
  <p>I am aware that you can use router files when using the normal PHP servers, but could anyone help me 'convert' this <code>.htaccess</code> file into a PHP router?</p>
  
  <p>Thanks in advance to anyone who can point me in the right direction!</p>
  
  <p><strong>EDIT:</strong> I guess a better way of putting this question would be, can anyone help me understand what the <code>.htaccess</code> file is doing? And then I could convert it into PHP fairly easily.</p>