I use Nuxt.js to generate a bunch of static html and hosted these on Google App Engine.
If the path of these html files are not found, I don't want App Engine to show 404 but instead handle it using another handler which match the pattern.
Edit app.yaml
handlers:- url: /places/([\w\d-]+) static_files: nuxt_static/\1/index.html upload: nuxt_static/([\w\d-]+)/index.html require_matching_file: true- url: /.* script: application.app
Using require_matching_file: true
, if /places/singapore
does not have nuxt_static/singapore/index.html
, the request handler is passed on to the next matching handler.
NOTE: require_matching_file: true
is not documented, but it works.