I am trying to use Google App Engine’s app.yaml to automatically serve *.html files when it is requested. So I have the following in my file structure:
-myapp
-html (folder)
-index.html
-index.py
In my app.yaml I have:
handlers:
-url: /*\.html
static_dir: html
-url: /.*
script: index.app
However, when I run this on my browser localhost:8080/index.html, I get a 404 Not Found.
Why is it not routing to my index.html file?
There is several ways you can do this type of thing depending on what you want exactly. You can use a regex such as @hyperslug added if all you want is static content without any of the more advanced features.
You can set urls like so:
which allows you to set page security on a individual file basis if that is what you want. Or you can combine regex with security such as:
Remember that if your sharing the pages with public search engines treat http/https as 2 different links. As well as with and without trailing /.