I would like to serve static files depending on the query parameter. More specificly I would like to serve prerendered snapshots for search engine optimalization. The pages are hosted on Google Appengine, so I'm using app.yaml to define these urls.
handlers:
# Consider anything matching a dot static content.
- url: /(.*\..*)$
static_files: dist/\1
upload: dist/(.*\..*)$
# Serve snapshots for seo
- url: /?_escaped_fragment_=(.*)
static_files: dist/snapshots/\1
upload: dist/(.*)$
# Otherwise let Angular handle it.
- url: /(.*)
static_files: dist/index.html
upload: dist/index.html
However, when I fetch a url with the query parameter _escaped_fragment_
, the last url handler is triggered. Is it possible to define query params in urls? If so, what am I doing wrong?