Symfony 2.3.4 NotFoundHttpException status 200 instead of 404 on prod

According to the symfony2 documentation, a NotFoundHttpException should be caught by the framework and eventually trigger a 404 response, but I just get a fatal error (Uncaught exception) with a status of 200 in the prod environment. In the development environment, I got 404. I use this:

throw $this->createNotFoundException(); 

I just want to display my customized 404 page. I cleared the cache, but that didn't help. Am I doing something wrong?

+4
source share

Source: https://habr.com/ru/post/1502281/


All Articles