1

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.

1 Answer 1

1

Apparently, version 1.4.2x does not support URL rewrite (even though the URL redirection works on the server side using 'reqirep'). We will be upgrading to version 1.5.x that supports the feature.

Posting this answer so that it may help someone who comes across the same scenario.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.