title: How to get redirect working (.htaccess) when using PHP -S localhost server?
body: <p>I used xampp in the past in order to develop websites on a local computer, but I recently found it less cumbersome to simply start a server using the <code>PHP -S localserver:8000</code> where <code>8000</code> is the port number. I managed to get <code>phpmyadmin</code> working that way and access databases. So all was fine ... until I tried to re-use redirecting rules within a <code>.htaccess</code> file.</p>
  
  <p>The rules work well on the my web provider's servers, but it doesn't work on localhost. I assume there's something to do in order to turn the re-write rules on but since I am not longer using xampp, I don't know if there's still something like Apache running in the background, etc. If someone has experience with this setup, I would like to know how or if this can be be done.</p>
  
  <h1>EDIT</h1>
  
  <p>The redirect is basic:</p>
  
  <pre><code>RewriteEngine On
  RewriteBase /
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule lessons/(.*)$ page.php?url=$1
  </code></pre>
  
  <p>And to make the question more meaningful (addressing some of the comments below), I think Finwe answered my question rightly, that is: "this doesn't work with the PHP approach, .htaccess is specific to Apache".</p>
  
  <p>My question wasn't about "what alternative solution do I have". The solution I would use is probably to go through a combination of AJAX/PHP to solve the limitation but that's surely not the most straightforward workaround.</p>