php - Config Symfony3 URL
I use a debian server and I want change my URLipAdresse:9999/app.php/register
withisAdress/register
.
I have succeed to remove the.../web/...
. But not the.../app.php/...
I have a virtual host :
Listen ipAdress:9999
<VirtualHost ipAdress:9999>
DocumentRoot "/var/www/SuperSwungBall/web"
DirectoryIndex app.php
<Directory "/var/www/SuperSwungBall/web">
AllowOverride All
Allow from All
</Directory>
</VirtualHost>
And a .htaccess in ~/web :
DirectoryIndex app.php
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^app.php - [L]
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^(.*)$ app.php [QSA,L]
</IfModule>
I have also tried with the default symfony ~/web/.htaccess . But, it doesn't work.
Thanks !
Answer
Solution:
This article describes a couple of examples on how to configure your webserver to route all requests through app.php with clean URL's: http://symfony.com/doc/2.8/cookbook/configuration/web_server_configuration.html
In your case your virtual host should look something like: