Redirect to another server with url sef active


through a haproxy I have to redirect requests of the type “http://my server/vo-tcs” to a server with IP address (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” everything works correctly, if instead I activate the Joomla URL SEF and the url is of the type “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.

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