I have the following .htaccess file in my web directory for my Symfony2 installation:
RewriteEngine On
RewriteCond %{R
That rewrite rule is not meant to remove app.php
from the URL. It's purpose is to use app.php
for every request, if a request URL doesn't correspond to a real file. Since app.php
is a real file, it will be used to serve a request.
If you want get rid of web/app.php
part, first create a virtual host pointing to the web
folder:
ServerName whatever
DocumentRoot /path/to/project/web
This will remove the web
part.
Then, to remove the app.php
part, add this to the beginning of the web/.htaccess
file:
RedirectMatch permanent ^/app\.php/(.*) /$1