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

**URL:** <https://discourse.haproxy.org/t/issues-getting-a-replacement-for-reqirep-upgrading-from-v2-0-3-to-v2-8-3/9451>\
**Category:** Help!\
**Created:** [January 30, 2024, 8:54pm UTC](https://discourse.haproxy.org/t/issues-getting-a-replacement-for-reqirep-upgrading-from-v2-0-3-to-v2-8-3/9451 "2024-01-30T20:54:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pascal](https://avatars.discourse-cdn.com/v4/letter/p/e9a140/32.png) [@Pascal](https://discourse.haproxy.org/u/Pascal)\
**Post date:** [January 30, 2024, 8:54pm UTC](https://discourse.haproxy.org/t/issues-getting-a-replacement-for-reqirep-upgrading-from-v2-0-3-to-v2-8-3/9451/1 "2024-01-30T20:54:45Z")

</div>

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 172.31.6.38:8080 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?

---

<div class="post-metadata">

**Author:** ![lukastribus](https://avatars.discourse-cdn.com/v4/letter/l/7ea924/32.png) [@lukastribus](https://discourse.haproxy.org/u/lukastribus)\
**Post date:** [January 30, 2024, 9:30pm UTC](https://discourse.haproxy.org/t/issues-getting-a-replacement-for-reqirep-upgrading-from-v2-0-3-to-v2-8-3/9451/2 "2024-01-30T21:30:03Z")

</div>

So you want to transform

```
/v123/b2b/pluto

```

into

```
/acme_b2b/v123/pluto

```

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.
