I have a multisite network, and my theme has a custom
404.php. On all the child sites this 404 handler is being correctly used, but on the primary site all 404s go back to the home page without touching my
404.php at all.
And for once, this isn't the fault of the Redirection plugin! The problem is still there when Redirection is turned off (network-wide and on the specific site).
The problem isn't occurring on my local copy of the same site, but I can't find any difference in the configuration or plugins that could be causing it.