I am trying to rewrite a single path via HAProxy. Without the rule in
place, a 404 is returned for the /directory page (from an IIS node).
Once I add the rule, the page returns a 504 Gateway Timeout after a
minute or so.

backend Example_Backend
    balance uri
    reqirep ^([^\ ]*)\ (.*)/directory/?[\ ]    \1\ \2/target.asp\
    server Server1 x.x.x.xx4:80 weight 25 check fall 10 rise 2 maxconn 40
    server Server2 x.x.x.xx5:80 weight 25 check fall 10 rise 2 maxconn 40
    server Server3 x.x.x.xx6:80 weight 25 check fall 10 rise 2 maxconn 40
    server Server4 x.x.x.xx7:80 weight 25 check fall 10 rise 2 maxconn 40

I have tested going directly to /target.asp (works as expected), and
confirmed that /directory returns a 404 when the rule is not in place.
Is there anything wrong with the way I'm using reqirep?

haproxy[25957]: x.x.x.100:50941 [31/May/2011:14:53:24.836]
Example_Frontend Example_Backend/Server4 77/0/3/-1/50083 504 194 - -
sH-- 1/1/1/1/0 0/0 "GET /directory/ HTTP/1.1"
haproxy[25957]: x.x.x.100:50942 [31/May/2011:14:53:26.124]
Example_Frontend Example_Backend/Server4 78/0/5/-1/50087 504 194 - -
sH-- 0/0/0/0/0 0/0 "GET /directory HTTP/1.1"

Thanks!

- Matt

Reply via email to