In Symfony2, when accessing my application locally via app_dev.php, everything works fine. However, when I access app.php it 404s:
Oops! An Error Occurred
The server returned a “404 Not Found”.
Something is broken. Please e-mail us at [email] and let us know what
you were doing when this error occurred. We will fix it as soon as
possible. Sorry for
A fresh symfony 2 install does not contain any routing for the production environment.
If you take a look under
app/config/routing_dev.yml, you will notice that all of the routes that you see in the demo application are defined only for development. If you wish to test the demo onapp.php, you have to first copy the routing fromrouting_dev.ymltorouting.yml, and also enable theAcmeDemoBundleunder youAppKernel.php:(+ is the line you should add, – is the line you should remove)