Consider the following URL : http://www.myurl.fr/accueil.
It won't work. However http://www.myrurl.fr/app.php/accueil does work.
I got rid of the .htaccess file because I want to use the vhost file and rely on Apache routing. My vhost file is as follow:
<VirtualHost my.ip.address>
ServerName myurl.fr
ServerAlias www.myurl.fr
DocumentRoot /var/www/mysite/web
DirectoryIndex app.php
<Directory "/var/www/mysite/web">
AllowOverride All
Allow from All
</Directory>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{ENV:REDIRECT_STATUS} ^$
RewriteRule ^app\.php(/(.*)|$) %{CONTEXT_PREFIX}/$2 [R=301,L]
RewriteRule .? - [L]
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^(.*)$ app.php [QSA,L]
RewriteCond %{REQUEST_URI}::$1 ^(/.+)(.+)::\2$
RewriteRule ^(.*) - [E=BASE:%1]
RewriteRule .? %{ENV:BASE}app.php [L]
</IfModule>
</VirtualHost>
I've cleared Apache cache and restarted it many times. The urlrewrite mod is enabled. I just don't know what else to check. Any idea what I'm missing ?
EDIT It could be that both URL won't work at a given time since I'm working on it. My issue is still valid.
AllowOverride All
toAllowOverride None
. Unlikely to solve your issue tho. – cheesemacfly Aug 16 '13 at 20:22