title: PHP 5.4 Built in Server, Fix file not found error
body: <p>I am using PHP 5.4 RC5, and starting the server via terminal </p>
  
  <pre><code>php -S localhost:8000
  </code></pre>
  
  <p>Currently using <a href="https://github.com/auraphp/Aura.Router/" rel="nofollow">Aura.Router</a> , and at the root I have index.php file with code </p>
  
  <pre><code>&lt;?php
  $map = require '/Aura.Router/scripts/instance.php';
  
  $map-&gt;add('home', '/');
  
  $map-&gt;add(null, '/{:controller}/{:action}/{:id}');
  
  $map-&gt;add('read', '/blog/read/{:id}{:format}', [
      'params' =&gt; [
          'id' =&gt; '(\d+)',
          'format' =&gt; '(\.json|\.html)?',
      ],
      'values' =&gt; [
          'controller' =&gt; 'blog',
          'action' =&gt; 'read',
          'format' =&gt; '.html',
      ]
  ]);
  
  $path = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);
  
  $route = $map-&gt;match($path, $_SERVER);
  if (! $route) {
      // no route object was returned
      echo "No application route was found for that URI path.";
      exit;
  }
  echo " Controller : " . $route-&gt;values['controller'];
  echo " Action : " . $route-&gt;values['action'];
  echo " Format : " . $route-&gt;values['format'];
  </code></pre>
  
  <p>A request for <code>http://localhost:8000/blog/read/1</code> works as expected.</p>
  
  <p>But when a dot json or dot html like <code>http://localhost:8000/blog/read/1.json</code> , <code>http://localhost:8000/blog/read/1.html</code> request comes, the php throws </p>
  
  <pre><code>Not Found
  The requested resource /blog/read/1.json was not found on this server.
  </code></pre>
  
  <p>As I am running the server with the built in php server, where can I fix not to throw the html and json file not found error ?</p>
  
  <p>Or do I want to go and install apache and enable mod rewrite and stuffs ?</p>