Is it possible to specify the equivalent of a default document for directories in Google App Engine so that navigating to that directory automatically redirects to its index.html for example, if it contains one?
If I have this in my app.yaml:
- url: /demos
static_dir: demos
and the demos directory contains an index.html page, how can I tell App Engine to automatically redirect to that page?
App Engine uses regular expression matches on the request path to determine what script to call or document to serve. If you just have the one index document, you can do it like this:
More generally, you can define static files for paths ending in slashes (‘directories’) like this: