URL redirect with acl

Hello Experts

I am trying to archive URL redirect based on the pattern in URL.
Regex seems to be fine. I confirmed that with haproxy - Regex Tester/Debugger
But I am not able to achieve the expected redirection.
I am on HA-Proxy version 1.8.8-1ubuntu0.11

Any help on this would be really appreciated.

This what I want to achive:

Redirect All url with prefix Y to http://get.mysite.app

Y http://mysite.app
Y http://mysite.app/
N http://mysite.app/test
Y https://mysite.app
N https://mysite.app/test
Y www.mysite.app
N www.mysite.app/test

N http://get.mysite.app
N http://get.mysite.app/
N http://get.mysite.app/test
N https://get.mysite.app
N https://get.mysite.app/
N https://get.mysite.app/test
N www.get.mysite.app
N www.get.mysite.app/test

I tried this

This redirect all urls including /test
acl do_not_redirect_1 hdr(host) -m reg -i (.)mysite.app([/\ ])(\w)
acl do_not_redirect_2 hdr(host) -m reg -i (.
)get.mysite.app(.*)

No redirect achived
acl do_not_redirect_1 path_beg,url_dec -m beg -i /(\w*)
acl do_not_redirect_2 path,url_dec -m sub -i get.

    http-request redirect location https://get.mysite.app/ if !do_not_redirect_1 !do_not_redirect_2

Maybe you can look only to the match domains and exclude the ones that have /test

I don’t test it, but it should work:

http-request redirect location https://get.mysite.app/ if { hdr_beg(host) mysite.app www.mysite.app } !{ path_beg /test }