I have a container I use to keep some courtesy redirects to 3rd party services. It is an HAproxy container with multiple http-request lines in it. Most are a single hdr(host) to redirect.
Azure has 3 different URLs for password management, I'm trying to put them all within one URL with different paths to redirect to the different pages.
This is what I have right now:
http-request redirect location http://aka.ms/passwordchange code 301 if { path /change hdr(host) -i passwords.example.com }
http-request redirect location https://aka.ms/sspr code 301 if { path /reset hdr(host) -i passwords.example.com }
http-request redirect location https://aka.ms/setupsecurityinfo code 301 if { hdr(host) -i passwords.example.com }
I also tried with the hdr(host) condition first, and I've also tried with an 'and' string between the conditions.
For some reason, in all of these different variations, it always matches only the first rule. So all requests, no matter if a path is specified, go to http://aka.ms/passwordchange.
I'm guessing that the conditions in a one liner like this can have multiple parts based on that fact that if they couldn't and only used the first item, then in the current version they should match only the 3rd rule.
Thanks for any help and explanation for what I might be missing here.