# Routing by string, it works for other strings

**URL:** <https://discourse.haproxy.org/t/routing-by-string-it-works-for-other-strings/1250>\
**Category:** Help!\
**Created:** [May 17, 2017, 7:36am UTC](https://discourse.haproxy.org/t/routing-by-string-it-works-for-other-strings/1250 "2017-05-17T07:36:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![HiTTi](https://avatars.discourse-cdn.com/v4/letter/h/e274bd/32.png) [@HiTTi](https://discourse.haproxy.org/u/HiTTi)\
**Post date:** [May 17, 2017, 7:36am UTC](https://discourse.haproxy.org/t/routing-by-string-it-works-for-other-strings/1250/1 "2017-05-17T07:36:48Z")

</div>

Hello community,

i am a nooby with haproxy but until jet i can work with it.

I try to route requests with ftp. or sftp over port 5022 to one webserver.  
So i configure:  
frontend sftp\_frontend  
bind \*:5022  
mode tcp  
default\_backend httpserver

```
#ftp routing
acl sftp_in_uri path_beg sftp. ftp. 
use_backend sftp_back if sftp_in_uri

```

backend sftp\_back  
server web01 192.168.2.50:5022 check

So i think all requests over port 5022 will be checked. If i enable that. It refused all requests to the webserver and i cant access my websites (Error Connection refused).

For my typo3 configuration it works;  
frontend https\_frontend  
bind \*:443  
mode tcp  
option httpclose  
option forwardfor  
reqadd X-Forwarded-Proto:\ https  
default\_backend httpserver

#layer7\_for\_typo3\_ssl  
acl url\_typo3 path\_beg /typo3  
use\_backend typo3\_back\_ssl if url\_typo3

backend typo3\_back\_ssl  
server webserver01-ssl 192.168.122:443 check  
server webserver11-ssl 192.168.123:443 check

Have someone an idea why the routing is stopped if i enable the ftp and sftp configuration an maybe why it doesnt work?

All requests with (http:// / https://) [ftp.xxxx.com](http://ftp.xxxx.com) or [sftp.xxxxx.com](http://sftp.xxxxx.com) should be routed.

cheers HiTTi

---

<div class="post-metadata">

**Author:** ![AaronWest](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.haproxy.org/aaronwest/32/164_2.png) [@AaronWest](https://discourse.haproxy.org/u/AaronWest)\
**Post date:** [June 7, 2017, 2:24pm UTC](https://discourse.haproxy.org/t/routing-by-string-it-works-for-other-strings/1250/2 "2017-06-07T14:24:59Z")

</div>

Only thing that jumped out was I think you are trying to use an ACL with path\_beg in TCP mode which I don’t think would work unless you switch to HTTP mode.
