title: The requested URL was not found on this server error
body: <p>I'm trying to create a website with Twig and Silex but I get a <code>404 Not Found</code> error when I want access to <code>/test</code> page.</p>
  <p><code>http://127.0.0.1/public_html/M1-CSI/web/</code> works.</p>
  <p><code>http://127.0.0.1/public_html/M1-CSI/web/test</code> doesn't works.</p>
  <h3>.htaccess</h3>
  <pre><code>&lt;IfModule mod_rewrite.c&gt;
     Options -MultiViews
  
     RewriteEngine On
     RewriteCond %{REQUEST_FILENAME} !-f
     RewriteRule ^ index.php [QSA,L]
  &lt;/IfModule&gt;
  </code></pre>
  <h3>Routing file</h3>
  <pre><code>&lt;?php
  
  $routes = $app['controllers_factory'];
  
  $routes-&gt;get('/', 'Sources\\Controllers\\ExempleController::exemple');
  $routes-&gt;get('/test', 'Sources\\Controllers\\ExempleController::test');
  
  return $routes;
  </code></pre>
  <h3>Controller</h3>
  <pre><code>&lt;?php
  
  namespace Sources\Controllers;
  
  use \Silex\Application;
  
  class ExempleController {
  
      public function exemple(Application $app) {
          return $app['twig']-&gt;render('exemple.html.twig', array('exempleValue' =&gt; 3));
      }
  
      public function test(Application $app) {
          return $app['twig']-&gt;render('test.html.twig');
      }
  
  }
  </code></pre>
  <p>Thank's a lot.</p>
  <h1>EDIT</h1>
  <p>You can find source code extract here : <a href="https://github.com/nlamblin/website-boilerplate" rel="nofollow noreferrer">https://github.com/nlamblin/website-boilerplate</a></p>
  <h1>SOLUTION</h1>
  <p>Problem solved.</p>
  <p>I added these code lines :</p>
  <pre><code>&lt;Directory /var/www/html/&gt;
       Options Indexes FollowSymLinks MultiViews
       AllowOverride All
       Order allow,deny
       allow from all
  &lt;/Directory&gt;
  </code></pre>
  <p>in <code>/etc/apache2/sites-available/000-default.conf</code></p>