HAProxy community

Can we redirect before going to final backend?

Hey folks,

I would like to know if I can make a redirection to a specific server, before handle the redirection to final backend ?

I will try to explain better with an example:

Here my condition:
use_backend plex if { hdr_beg(Host) -i plex. }

here my backend:
backend plex
server plex 127.0.0.1:32400 check

basic content delivering, working great.

I would like to make a sort of announce to the user and redirect him to a temporary web page on my server then redirect to the backend.

Is this possible with haproxy ?

Thank you

Hi,

No, you can’t do this directly.
What you can do is to route to that “information” server in case the client does not have a cookie or a url param or a whatever indicating it has never seen the information page.
Then, if a client comes in, you can easily spot if he got already redirected to that information message or not.

Thank you, I guess your refer to this:

?