Symfony2 returns No route found for \"GET /\" when I try to run http://localhost/app_dev.php, but this url works: http://localhost/app_dev.php/hello/Symfony. I removed AcmeD
i could have been only one who made this mistake but maybe not so i'll post.
the format for annotations in the comments before a route has to start with a slash and two asterisks. i was making the mistake of a slash and only one asterisk, which PHPStorm autocompleted.
my route looked like this:
/*
* @Route("/",name="homepage")
*/
public function indexAction(Request $request) {
return $this->render('default/index.html.twig');
}
when it should have been this
/**
* @Route("/",name="homepage")
*/
public function indexAction(Request $request) {
return $this->render('default/base.html.twig');
}