We are moving our site from a self-hosted server to Netlify. Our site can be visited by quite a few subdomains, and we have some rewrite rules in Nginx that redirect based on the subdomain, e.g.:
abc.example.com/redirect-this/ redirects to
xyz.example.com/redirect-this/ redirects to
In nginx, it’s pretty trivial to access the subdomain/host name and use that as a parameter in the redirect, but I couldn’t see any mention of this in the _redirects docs. I understand that I could write a domain-specific rule for each subdomain, but we’re actually handling a lot of subdomains, and I’d prefer to have a wildcard approach so that we didn’t have to push a change to the _redirects file every time we added or removed a domain. Is such a thing possible?