Configurar url base Symfony2 para proyecto implementado

I have deployed a Symfony2 project onto a server. I have added a .htaccess file in the project folder to automatically access the /web/app.php file.

Here is the .htaccess file I have added:

<IfModule mod_rewrite.c>
    RewriteEngine On

    <IfModule mod_vhost_alias.c>
      RewriteBase /booking/itinerary/

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^(.*)$ web/app.php [QSA,L]

The problem I have is that I cannot set up the base url for routing as being /booking/itinerary. I get the following error from symfony:

No route found for "GET /booking/itinerary/"

Although the 'booking/itinerary' should route to the 'homepage' with the pattern '/'.

How can I fix this? 'Cause it would be a pain to change all the routes in the project.

preguntado el 28 de julio de 12 a las 22:07

Have you tried using "RewriteBase /booking/itinerary" (without "/" at the end)? -

Have you tried to move RewriteBase out of conditions with mod_vhost_alias.c? -

0 Respuestas

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.