title: Silex slugs cause 404 page not found
body: <p>Following the <a href="http://silex.sensiolabs.org/doc/usage.html" rel="nofollow">documentation</a>, Silex allows "slugs" to be passed in via the URL for use within your code.</p>
  
  <p>The following example works:</p>
  
  <pre><code>$app = new Silex\Application();
  
  $app-&gt;get('/', function () {
      return 'HAI';
  });
  </code></pre>
  
  <p>However, the following gives a 404 Not Found:</p>
  
  <pre><code>$app = new Silex\Application();
  
  $app-&gt;get('/{slug}', function ($slug) {
      return 'HAI' . $slug;
  });
  </code></pre>
  
  <p><strong>How can I fix this 404?</strong></p>
  
  <p>In case it's of any relevance, here's my Apache Vhost:</p>
  
  <pre><code>&lt;VirtualHost 127.0.0.1:80&gt;
      DocumentRoot "/var/www/Silex/web"
      DirectoryIndex index.php
  
      &lt;Directory "/var/www/Silex/web"&gt;
          AllowOverride All
          Allow from All
      &lt;/Directory&gt;
  &lt;/VirtualHost&gt;
  </code></pre>
  
  <p>...and my directory structure:</p>
  
  <pre><code>/src
    |-- bootstrap.php
  /tests
  /vendor
  /web
    |-- index.php
  </code></pre>