I have my application in symfony 2 done.
And now I want to remove the web/app_dev.php/ from the url.
I read about this and after doing this:
php app/console cache:clear --env=prod --no-debug
And add .htaccess:
DirectoryIndex app.php
<IfModule mod_rewrite.c>
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]
</IfModule>
<IfModule !mod_rewrite.c>
<IfModule mod_alias.c>
RedirectMatch 302 ^/$ /app.php/
</IfModule>
</IfModule>
After this I can use the url: localhost/test/web/ But it's not exactly my goal. I want to remove the web also.
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.
My question is, How can I remove the /web/ from the url? And how can I have the stylesheet missing?