I have the opposite problem to many: When I use the official method to remove index.php and then enter an invalid url/template group, e.g.


I do not get a 404 error, instead the most recently added page is shown.

Here's my setup:

  • EE 2.9.2
  • Strict URLs are enabled.
  • The correct 404 template is set.

Because most have the inverse situation I could not find much to help me debug this issue. If I delete the code that removes index.php I get a 404 as expected.

Any pointers are greatly appreciated. Thank you.

1 Answer 1


I found the issue. In the 404 template I embed a generic template, and the url to that template was wrong.

If you are stuck with the same issue, track your template nesting for clues. Good luck!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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