Multiple backend redirections

I have some problem with backend redirection

Here is my configs
acl somesite-acl path_sub /service/v2/amount/balance path_sub /service/v2/amount/fund path_sub /service/pg path_sub /service/testing
use_backend be_somesite if somesite-acl

backend be_somesite
http-request set-header Host
reqirep ^([^\ :])\ /(.) \1\ /service/v2/amount/\2
reqirep ^([^\ :])\ /(.) \1\ /service/pg/\2
reqirep ^([^\ :]*)\ /testing \1\ /service/tested/\2
server site_node cookie S2 cookie S2 check ssl verify none

Below is what I want to achieve

Can someone try to help as I am new to haproxy and I have been working from few days to fix this, but haven’t find any solution yet

try this…

 http-response redirect code 301 location[customHeader] unless { hdr_beg(host) -i }

I got it from the example in the docs from this section -

Since %[capture.req.uri] would not be available in backend, you have to store that value in a custom request header & read that value in backend section