title: Correct rewrite paths for .htaccess file for silex?
body: <p>I've just begun experimenting with <a href="http://silex.sensiolabs.org/" rel="nofollow">silex</a>. I'm following <a href="http://silex.sensiolabs.org/doc/web_servers.html" rel="nofollow">the documentation</a> and am confused which way to go with the .htaccess paths. Some background: </p>
  
  <ul>
  <li>I'm using WAMP for my dev webserver, with <code>mod_rewrite</code> enabled</li>
  <li>I have <a href="http://silex.sensiolabs.org/download" rel="nofollow">the "slim" copy of Silex</a> unzipped and copied to c:\wamp\www\silex\</li>
  <li>I have <a href="http://silex.sensiolabs.org/doc/intro.html" rel="nofollow">the example hello world route</a> in c:\wamp\www\silex\web\index.php</li>
  <li>I have an .htaccess file that lives in the <em>silex</em> directory</li>
  </ul>
  
  <p>The .htaccess file:</p>
  
  <pre><code>&lt;IfModule mod_rewrite.c&gt;
      Options -MultiViews
      RewriteEngine On
      RewriteBase /silex/web
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteRule ^ index.php [QSA,L]
  &lt;/IfModule&gt;
  </code></pre>
  
  <p>If I go to <strong>localhost/silex/web/hello/world</strong>, I get a working "Hello world" page, which is great.</p>
  
  <p>...but if I go to <strong>localhost/silex/hello/world</strong>, I get the silex error:</p>
  
  <blockquote>
    <p>No route found for "GET /silex/hello/world"</p>
  </blockquote>
  
  <p>That error makes sense to me... but does this mean that "web/" must be included in all of the site's URLs? Is that normal for silex apps?</p>
  
  <p>Some questions come to mind:</p>
  
  <ul>
  <li>Which directory should the .htaccess file be  in -- <code>silex/</code> or <code>silex/web/</code>? Are there any problems I might run into with having it in either spot?</li>
  <li>Should the <code>RewriteBase</code> go to <code>/silex</code> or <code>/silex/web</code>? (documentation vaguely says "/path/to/app"; to me that means /silex)</li>
  </ul>