I have the pathauto setting up URLs as /Country/Dept/node-name (i.e. - /US/Training/How-To-Create-Node). If I enter a non-existent path at the root, it goes to my default 404 page I created. However, if the path is /Country/Dept/ anything, it just goes to the parent folder. How can I get it to go to the 404 page, regardless of the path?
In my case, the main problem was that there were blank landing pages for the parts of the URL. For instance, there was a blank US page for /US/Training/page-title. So, Drupal was finding /US and just redirected the visitor to that page. Because of this, no 404 was being registered, therefore never redirecting to the 404 page. None of the 404 modules helped for this.
Because I have a Taxonomy term for the Country that is used to set the URL, I simply removed the blank landing pages. Now, it will properly register a 404 and will go to my custom 404 node.