3

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?

1

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.

0

The module 404 Navigation provides a 404 path for a solution for Drupal 7. It doesn't provide any path in the 404 page. You'll just get a message:

The requested page could not be found.

which is without any path.

Or for more control you can check my answer here.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.