I ran into this problem trying to answer this SO question here: Removing PHP file extension when serving PHP files about how to route certain requests in app.yaml for Googl
Use non-greedy regex.
/(.*?)/?$
DEMO