title: Remove web/app_dev.php/ from url
body: <p>I have my application in symfony 2 done.<br>
  And now I want to remove the web/app_dev.php/ from the url.</p>
  
  <p>I read about this and after doing this:</p>
  
  <pre><code>php app/console cache:clear --env=prod --no-debug
  </code></pre>
  
  <p>And add .htaccess:</p>
  
  <pre><code>DirectoryIndex app.php
  
  &lt;IfModule mod_rewrite.c&gt;
      RewriteEngine On
  
      RewriteCond %{REQUEST_URI}::$1 ^(/.+)/(.*)::\2$
      RewriteRule ^(.*) - [E=BASE:%1]
  
      RewriteCond %{ENV:REDIRECT_STATUS} ^$
      RewriteRule ^app\.php(/(.*)|$) %{ENV:BASE}/$2 [R=301,L]
  
      RewriteCond %{REQUEST_FILENAME} -f
      RewriteRule .? - [L]
  
      RewriteRule .? %{ENV:BASE}/app.php [L]
  &lt;/IfModule&gt;
  
  &lt;IfModule !mod_rewrite.c&gt;
      &lt;IfModule mod_alias.c&gt;
          RedirectMatch 302 ^/$ /app.php/
      &lt;/IfModule&gt;
  &lt;/IfModule&gt;
  </code></pre>
  
  <p>After this I can use the url: localhost/test/web/
  But it's not exactly my goal. I want to remove the web also.</p>
  
  <p>And after this there's another problem. When I'm using localhost/test/web/ to access the page there's some stylesheet missing, but in app_dev.php everything looks good.</p>
  
  <p>My question is, How can I remove the /web/ from the url?
  And how can I have the stylesheet missing? </p>