Best strategy for different 404s in different website sections


Could you give some advices for creating different 404 pages for different website sections? For example: front part and admin (control panel) part of a website.

We have a single not found handler injected to DIC. How we should analyze which 404 view to show? Should we parse $request->getUri()->getPath() somehow? Or maybe is there a way to assign different not found handlers for different website parts? Or maybe there is another ways to do that?

Thank you!