I\'ve setup a static website on GAE using hints found elsewhere, but can\'t figure out how to return a 404 error. My app.yaml file looks like
- url: (.*)/
The dev_appserver is already returning 404 responses for anything that doesn't match the mapping, or does match the mapping but doesn't exist. The 404 response itself has no body, but it's still a 404:
$ wget -O - http://127.0.0.1:8080/foo
--2010-10-28 10:54:51-- http://127.0.0.1:8080/foo
Connecting to 127.0.0.1:8080... connected.
HTTP request sent, awaiting response... 404
2010-10-28 10:54:51 ERROR 404: (no description).
$ wget -O - http://127.0.0.1:8080/foo/
--2010-10-28 10:54:54-- http://127.0.0.1:8080/foo/
Connecting to 127.0.0.1:8080... connected.
HTTP request sent, awaiting response... 404
2010-10-28 10:54:54 ERROR 404: (no description).
If you want to return a more user-friendly error page, follow jonmiddleton's advice and specify a custom 404 page.