Environment
Live server at V5.98
Steps to reproduce
Visit http://teammatesv4.appspot.com/abc
Expected behaviour
Fail gracefully with a 404 status code and error page
Actual behaviour

Is this bug able to be replicated on localhost? Somehow, I just get redirected to Error 404 page upon invalid URLs. (I'm on latest master)
Need staging server to replicate; it seems like an issue with GAE's default handler servlet.
Found some threads facing a similar issue:
@whipermr5 take a look at them and see if you find any of them viable. Will get started working on it once you revert.
@HirdayGupta The first one looks viable :)