Gdy próbuje wejść na swoją stronę Symfony2 przez adres: http://127.0.0.1/symfony2/web/app_dev.php/demo/hello/test prawidłowo wyświetla mi stronę www. Jednak gdy usunę app_dev.php wyświetla mi komunikat 404.
Czyściłem cache za pomocą konsoli z polecenia: console cache:clear jednak nic to nie dało.
Zauważyłem również, że plik routing.yml mam pusty (w routing_dev.yml są wpisy) więc skopiowałem tylko te podstawowe, tj:
Kod
_welcome:
pattern: /
defaults: { _controller: AcmeDemoBundle:Welcome:index }
_demo_secured:
resource: "@AcmeDemoBundle/Controller/SecuredController.php"
type: annotation
_demo:
resource: "@AcmeDemoBundle/Controller/DemoController.php"
type: annotation
prefix: /demo
pattern: /
defaults: { _controller: AcmeDemoBundle:Welcome:index }
_demo_secured:
resource: "@AcmeDemoBundle/Controller/SecuredController.php"
type: annotation
_demo:
resource: "@AcmeDemoBundle/Controller/DemoController.php"
type: annotation
prefix: /demo
do routing.yml ponownie wyczyściłem cache, ale wciąż ten sam komunikat błędu 404.