Wildcard Subdomains and Host name |
I am trying to setup routing based on hostname and subdomains.
in my routes, I have something similar to PHP Code: $routes->post('/', 'Api:endpoint', ['hostname' => 'my.apiserver.com']); In my config my baseurl is 'my.apiserver.com' The goal is for post requests to the 'my.apiserver.com' host to go to Api:endpoint and for requests to 'team.my.apiserver.com' to go to TeamApi:endpoint. The effect is that Api:endpoint is never reached, and all directed towards the TeamApi:endpoint. Because the subdomain is dynamic and is assigned to a group, it cannot be hard coded. Is there a way to achieve the goal in routing or is a different approach necessary? |
Messages In This Thread |
Wildcard Subdomains and Host name - by rockinmusicgv - 08-07-2022, 04:29 PM
RE: Wildcard Subdomains and Host name - by rockinmusicgv - 08-07-2022, 06:26 PM
|