I downloaded symfony2 and I am able to run it starting from app_dev.php.
But when I start from app.php, then I get an error page 404.
app.php though is of course there and it gets executed.
The error happens apparently somewhere after the last line of code in app.php:
$kernel->handle(Request::createFromGlobals())->send();
I guess there is a switch somewhere I have to configure.
EDIT:
As suggested by GeLo I added the routing for the production version to app/config/routing.yml.
_welcome:
resource: "@AcmeDemoBundle/Resources/config/routing.yml"
prefix: /
I created src/Acme/DemoBundle/Resources/config/routing.yml with content:
bla:
pattern: /
defaults: {_controller:AcmeDemoBundle:Demo:index}
In DemoController::indexAction()
I placed a die(__FILE__)
;
nothing; I still get 404 from app.php !?
EDIT regarding the answer:
./app/console --env=prod cache:clear
did the trick. mind the env-parameter.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…