This question is related to HAProxy 1.4.27. I have an application that can be accessed using the context path '/foo/foobar?..." like below:
http://www.myserver.com/foo/foobar or http://www.myserver.com/foo/foobar/showDetails.do?id=1002 The context path now has changed to '/foobar' lately, but the users have the old URLs bookmarked. I was trying to redirect the user to the new context using the 'redirect' configuration in haproxy.cfg but that only works if the url is an exact match. Is there a way to configure the haproxy.cfg to redirect to
http://www.myserver.com/foobar or http://www.myserver.com/foobar/showDetails.do?1002 This is the redirect configuration that I am using:
redirect location /foobar/ if { url /foo/foobar/} I tried using the 'reqirep' too but was not able to configure it properly (haproxy process throws errors while trying to restart).
Any help in this regard will be greatly appreciated.