I've defined a new server block with a regex match and redirect:
server {
listen 80;
server_name ~^homersimpson.(?<domain>.*)$;
rewrite ^ $scheme://$domain/apply?ref=thesimpsons redirect;
}
But the URL after curling is without the query string?
curl -w "%{url_effective}\n" -I -L -s -S https://homersimpson.domain.com -o /dev/null
https://homersimpson.domain.com/
How do i rewrite the url with a query string?