Is it possible to configure app.yaml to use two distinct PHP scripts, with one handling the naked domain and another handling all other sub-domains?
- url: /.*
- url: /.*.mydomain.com
Not possible using the
app.yaml pattern routing since the patterns are applied only on the file path portion of the requested URL (without the domain name).
Yes, modules can be mapped to different domains, with routing based on the
dispatch.yaml file, which would look somehow along these lines:
dispatch: - url: "mydomain.com/*" module: naked_domain_module - url: "*mydomain.com/*" module: subdomain_module
dispatch.yamlmatters - first match wins
- url: "*/naked/*" module: naked_domain_module
But in this case you need to account for that added path pattern in the
app.yaml routing as well and revert it when deploying in production. If you keep this path pattern in production then you don't need all this module story as you can latch on it in the