Issues getting a replacement for reqirep upgrading from v2.0.3 to v2.8.3

Hello, we’re going from version haproxy v2.0.3 to haproxy 2.8.3 and are trying to get this backend to work.

backend sand6_b2b_api_servers
balance roundrobin
option redispatch
option forwardfor
option httpchk GET /acme_b2b/v1/health
reqirep ^([^\ :])\ /v([0-9]+)/b2b/(.) \1\ /acme_b2b/v\2/\3
server sand6.b2b.api.1 weight 16 maxconn 112 check inter 10s

We’ve tried a few different things replacing reqirep with the following
reqirep => http-request replace-path
reqirep => http-request replace-pathq
reqirep => http-request replace-uri

Unfortunately we’re not getting the URL that we’re expecting. Do you have any suggestions?

So you want to transform




is that a correct?

I’m assuming something like:

http-request replace-path /v([0-9]+)/b2b/(.*) /acme_b2b/v\1/\2

would do the job; if it doesn’t you’d have to be more specific about what you expect vs would you get.