Custom 404 only served at /singledirectory/ depth

We replaced an old website with a new trellis/bedrock/sage install with all new content structure for everything so getting a lot of 404s etc. The 404 template setup in sage is great, but it only seems to serve when urls are only a single directory deep.

So something like https://ourdomain.com/media/someold.pdf will serve the 404 but https://ourdomain.com/media/reports/someold.pdf will not serve the 404. It will just serve a blank page titled “Page not found”.

Same thing just goes with any old page not just like media downloads. I am kind of dumb at this and wondering where I would fix/change this behaviour. Get it to serve the 404 for /any/number/of/directories/deep.

Thank you.

:thinking: the depth of the URL shouldn’t matter.

Example: https://roots.io/media/reports/asdf.pdf

We haven’t done anything to customize the 404 handling. Is that what you’d expect?

Hello All, this is an old topic, but I just ran into the following issue with sage9:
if I set a custom permalink structure for all posts to have /blog/ in the url (/blog/%postname%/) the 404 template part is not loading.

Did anyone else run in this issue? It works fine with the postname permalink structure.