# Redirect to another server with url sef active

**URL:** <https://discourse.haproxy.org/t/redirect-to-another-server-with-url-sef-active/7067>\
**Category:** Help!\
**Created:** [November 8, 2021, 7:55pm UTC](https://discourse.haproxy.org/t/redirect-to-another-server-with-url-sef-active/7067 "2021-11-08T19:55:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![smangiagli](https://avatars.discourse-cdn.com/v4/letter/s/ecae2f/32.png) [@smangiagli](https://discourse.haproxy.org/u/smangiagli)\
**Post date:** [November 8, 2021, 7:55pm UTC](https://discourse.haproxy.org/t/redirect-to-another-server-with-url-sef-active/7067/1 "2021-11-08T19:55:49Z")

</div>

Greetings,

through a haproxy I have to redirect requests of the type “[http://my](http://my) server/vo-tcs” to a server with IP address 172.22.80.40 (SRV1). I state that on SRV1 the Joomla cms is installed and it is installed in a subdirectory called “vo-tcs”  
If I do not activate the URL SEF (within the Joomla configuration) everything works correctly and the requests are of the type “[http://mioserver/vo-tcs/index.php?option=com\_wrapper&view=wrapper&Itemid=155](http://mioserver/vo-tcs/index.php?option=com_wrapper&view=wrapper&Itemid=155)” everything works correctly, if instead I activate the Joomla URL SEF and the url is of the type “[http://mioserver/vo-tcs/tna](http://mioserver/vo-tcs/tna)” I get the error message 404 (page not found).

Could you give me a hand? I am attaching the configuration.

```auto
frontend Local_Server
    mode http
    bind *:80
    acl is_vo-tcs path_beg -i /vo-tcs
    use_backend be_vo-tcs if is_vo-tcs

backend be_vo-tcs
    mode http
    reqrep ^([^\]*\ /)vo-tcs[/]?(.*) \1\2
    http-request set-header X-Forwarded-Port %[dst_port]
    http-request add-header X-Forwarded-Proto https if { ssl_fc }
    http-request set-path %[path,regsub(^/?,/vo-tcs/)]
    option httpchk HEAD / HTTP/1.1rnHost:localhost
    server web7 172.22.80.40:80

```
