OK. Here is my config file, I have added the http-server-close option. I've read that is necessary to get reqirep to work properly since it does not work in tunnel mode.
global log /dev/log local0 log /dev/log local1 notice chroot /var/lib/haproxy stats socket /run/haproxy/admin.sock mode 660 level admin stats timeout 30s user haproxy group haproxy daemon # Default SSL material locations ca-base /etc/ssl/certs crt-base /etc/ssl/private # Default ciphers to use on SSL-enabled listening sockets. # For more information, see ciphers(1SSL). ssl-default-bind-ciphers kEECDH+aRSA+AES:kRSA+AES:+AES256:RC4-SHA:!kEDH:!LOW:!EXP:!MD5:!aNULL:!eNULL defaults log global mode http option httplog option dontlognull option forwardfor option http-server-close timeout connect 5000 timeout client 50000 timeout server 50000 timeout http-request 10000 errorfile 400 /etc/haproxy/errors/400.http errorfile 403 /etc/haproxy/errors/403.http errorfile 408 /etc/haproxy/errors/408.http errorfile 500 /etc/haproxy/errors/500.http errorfile 502 /etc/haproxy/errors/502.http errorfile 503 /etc/haproxy/errors/503.http errorfile 504 /etc/haproxy/errors/504.http listen stats #disabled bind *:8888 stats enable stats uri /haproxy?stats stats realm Strictly\ Private stats auth admin:haproxytime frontend http-in bind *:80 tcp-request content reject if { src -f /etc/haproxy/blacklist.lst } # http-request redirect location http://www.edrnet.com unless { src -f /etc/haproxy/whitelist.lst } timeout client 600000 capture request header Host len 50 # Tablenitio stick-table type ip size 100k expire 30s store conn_cur # Shut the new connection if the client has already 20 opened tcp-request connection reject if { src_conn_cur ge 20 } tcp-request connection track-sc1 src acl webqa hdr_dom(host) -i webqa acl webdev hdr_dom(host) -i webdev acl webstage hdr_dom(host) -i webstage acl vecapp url_sub /vaporencroachment/vaporencroachment.html reqirep ^([^\ :]*)\ /ordering/vaporencroachment/vaporencroachment.html(.*) \1\ /ordering/lightbox/vecapp.html\2 if vecapp # http-request redirect prefix /ordering/lightbox/vecapp.html if vecapp use_backend webqa if webqa use_backend webdev if webdev use_backend webstage if webstage default_backend web frontend https-in # bind *:443 ssl crt /etc/ssl/web.foo.com.2011.chain.pem bind *:443 ssl crt /etc/ssl/WILDCARD.foo.com.2011.chain.pem tcp-request content reject if { src -f /etc/haproxy/blacklist.lst } #http-request redirect location http://www.edrnet.com unless { src -f /etc/haproxy/whitelist.lst } timeout client 600000 capture request header Host len 50 # Table definition stick-table type ip size 100k expire 30s store conn_cur # Shut the new connection as long as the client has already 10 opened tcp-request connection reject if { src_conn_cur ge 10 } tcp-request connection track-sc1 src acl webqa hdr_dom(host) -i webqa acl webdev hdr_dom(host) -i webdev acl webstage hdr_dom(host) -i webstage use_backend webqa if webqa use_backend webdev if webdev use_backend webstage if webstage default_backend web backend web timeout server 600000 balance roundrobin server edrwebproawvc2 xxx.xxx.xxx.xxx:80 check server edrwebproawvc3 xxx.xxx.xxx.xxx:80 check backend webqa timeout server 600000 balance roundrobin server edrwebqaawvc1 xxx.xxx.xxx.xxx:80 check backend webdev timeout server 600000 balance roundrobin server edrwebdevawvd1 xxx.xxx.xxx.xxx:80 check backend webstage timeout server 600000 balance roundrobin server edrwebstgawvc1 xxx.xxx.xxx.xxx:80 check Let me know if I am missing something or have a conflict that is restricting the reqirep from working... Thanks for all your help. -----Original Message----- From: Baptiste [mailto:bed...@gmail.com] Sent: Monday, September 01, 2014 3:40 AM To: JDzialo John Cc: haproxy@formilux.org Subject: Re: URL Rewrite John, might be an issue somewhere else in your conf, cause your rewrite works properly. Baptiste On Sun, Aug 31, 2014 at 4:03 PM, JDzialo John <jdzi...@edrnet.com> wrote: > OK. > > > > So I tried a few things I found on the haproxy config guide and still > am not successfully able to get reqirep to work properly... > > > > I have the following two lines in my haproxy.cfg with haproxy 1.5.2 > > > > acl vecapp url_sub /vaporencroachment/vaporencroachment.html > > > > reqirep ^([^\ :]*)\ > /ordering/vaporencroachment/vaporencroachment.html(.*) > \1\ /ordering/lightbox/vecapp.html\2 if vecapp > > > > I am trying to replace the matched string above while keeping any > query string in tact. > > > > Is there something I'm doing wrong in my regular expression? > > > > Thanks > > > > > > From: Baptiste [mailto:bed...@gmail.com] > Sent: Friday, August 29, 2014 5:24 PM > To: JDzialo John > Cc: haproxy@formilux.org > Subject: Re: URL Rewrite > > > > > > > > On Fri, Aug 29, 2014 at 10:50 PM, JDzialo John <jdzi...@edrnet.com> wrote: > > I want to capture the URL coming in and rewrite it to a new location. > > > > Take this... > > > > http://web.foo.com/ordering/vaporencroachment/vaporencroachment.html?p > guid=12957559-e75e-4daf-a8c6-928030d714a9&lsessguid=b667871e-f11a-4960 > -8ad4-bb40ac249364 > > > > And convert it to this... > > > > http://web.foo.com/ordering/lightbox/vecapp.html?pguid=12957559-e75e-4 > daf-a8c6-928030d714a9&lsessguid=b667871e-f11a-4960-8ad4-bb40ac249364 > > > > I want to maintain the query string. > > > > Can I do this with reqirep? If so can you give me an example? > > > > Or can I use a simple redirect prefix and maintain the query string. > > > > Thanks > > > > > > John Dzialo | Linux System Administrator > > Direct 203.783.8163 | Main 800.352.0050 > > > > Environmental Data Resources, Inc. > > 440 Wheelers Farms Road, Milford, CT 06461 > > > > www.edrnet.com | commonground.edrnet.com > > > > > > > > Hi John, > > > > reqirep can do this. > > > > Baptiste > >