Route works only in debug mode


#1

I have a route in my controller (in the AppBundle) with the Symfony annotation. Action in controller has
/**
* @Route(“myroute”)
*/

routing.yml is like this:
app:
resource: “@AppBundle/Controller/”
type: annotation
prefix: /

This works like a charm…until I switch off debug mode. So it works in debug mode, but if I switch off debug mode, I get an error 404. Anybody an idea why this route only works in debug mode?


#2

Hi,
did you try to clear the symfony cache for production environment?

BR
Christian


#3

First thing I’ve tried :wink: