SymfonyWorld Online 2021 Winter Edition December 9 – 10, 2021 100% Online 25 talks and 10 workshops

New in Symfony 2.4: Easier debugging of not-found resources

Warning: This post is about an unsupported Symfony version. Some of this information may be out of date. Read the most recent Symfony Docs.

Contributed by
scourgen hung
in #8708.

When a 404 occurs in a web application, knowing the root cause helps fixing the problem: is it someone trying to hack your website by trying different well-known URLs? Is it a dead-link on your website? or on another one? If the 404 comes from your website, fixing it should be relatively easy.

The only source of information about the cause is the HTTP Referer header. And even if it cannot be trusted, it can help nonetheless. That's why as of Symfony 2.4, the HTTP Referer is added in the NotFoundHttpException exception message thrown by the router listener.

Help the Symfony project!

As with any Open-Source project, contributing code or documentation is the most common way to help, but we also have a wide range of sponsoring opportunities.

New in Symfony 2.4: Easier debugging of not-found resources

Tweet this


Great, thanks!
Nice and needed feature. Thanks again!! ;)
Good idea.
Surely, it would help

Comments are closed.

To ensure that comments stay relevant, they are closed for old posts.