I am trying to get some URL rewriting done with the following config. I've sanitized it with generic strings. It should only do the rewrite on string3 if it is coming from a bot. The request paths appear to be passing through unmodified.

It does appear that the use_backend stuff is working, but the reqirep statements aren't working. What am I doing wrong?

frontend service *:80
acl bot hdr(user-agent) -i ia_archiver jeeves googlebot mediapartners-google msnbot slurp zyborg
    acl string1      path_beg        -i /string1/
    acl string2      path_beg        -i /string2/
    acl string3      path_beg        -i /string3/

reqirep ^/string1/(.*) /cgi-bin/cgi-gw.exe?id=\1&action=webres if string1
    reqirep ^/string2/(.*) /cgi-bin/cgi-gw.exe?id=\1&action=capt if string2
reqirep ^/string3/(.*) /cgi-bin/cgi-gw.exe?id=\1&action=autodetails if bot string3

    use_backend apache          if string1
    use_backend apache          if string2
    use_backend apache          if bot string3
    default_backend             tomcat

backend apache
    balance     leastconn
#    server      server8080 10.10.14.127:8080 check
    server      server8081 10.10.14.127:8081 check

backend tomcat
    balance     leastconn
    server      server8080 10.10.14.127:8080 check
    server      server8081 10.10.14.127:8081 backup check


Reply via email to