Sunday, September 15, 2013

Symfony 2.3.4 NotFoundHttpException status 200 istead of 404 on prod

Symfony 2.3.4 NotFoundHttpException status 200 istead of 404 on prod

According to symfony2 documentation NotFoundHttpException should be
catched by framework and ultimately triggers a 404 response, but I'm just
getting fatal error (Uncaught exception) with status 200 on prod
environment. On dev environment i got 404. I'm using this:
throw $this->createNotFoundException();
I just want to display my customized 404 page. Am I doing something wrong?

1 comment:

  1. What is the message of the thrown exception? You can mail me: khanhvuongtuan1@gmail.com - Working at ComponentPro

    ReplyDelete