# URL based rerouting

**URL:** <https://discourse.haproxy.org/t/url-based-rerouting/4115>\
**Category:** Help!\
**Created:** [July 31, 2019, 12:37pm UTC](https://discourse.haproxy.org/t/url-based-rerouting/4115 "2019-07-31T12:37:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rohit](https://avatars.discourse-cdn.com/v4/letter/r/41988e/32.png) [@rohit](https://discourse.haproxy.org/u/rohit)\
**Post date:** [July 31, 2019, 12:37pm UTC](https://discourse.haproxy.org/t/url-based-rerouting/4115/1 "2019-07-31T12:37:09Z")

</div>

Hi Guys,  
How do I change the haproxy.cfg file to ensure that,

if I hit x.x.x.x/f5 it hits my backend at **g.h.i.j:4444**

I defined a rule like below:

listen horizon  
bind x.x.x.x:80  
balance source  
http-request del-header X-Forwarded-Proto if { ssl\_fc }  
**acl acl\_myApp path\_beg /f5**  
**use\_backend myAppBackEnd if acl\_myApp**  
server devindcontrol01 b.y.y.y:80 check inter 2000 rise 2 fall 5  
server devindcontrol02 c.y.y.y:80 check inter 2000 rise 2 fall 5  
server devindcontrol03 d.y.y.y:80 check inter 2000 rise 2 fall 5

**backend myAppBackEnd**  
\*\* server myAppServer1 g.h.i.j:4444 check\*\*

Thanks,  
Rohit

---

<div class="post-metadata">

**Author:** ![GrzegorzWiktorowski](https://avatars.discourse-cdn.com/v4/letter/g/7ba0ec/32.png) [@GrzegorzWiktorowski](https://discourse.haproxy.org/u/GrzegorzWiktorowski)\
**Post date:** [July 31, 2019, 3:14pm UTC](https://discourse.haproxy.org/t/url-based-rerouting/4115/2 "2019-07-31T15:14:48Z")

</div>

I’m not HAProxy expert but maybe this helps:

[https://discourse.haproxy.org/t/building-acls-using-others-acls/4092](https://discourse.haproxy.org/t/building-acls-using-others-acls/4092)
