indeed this way it works... thx !

On Fri, Oct 18, 2013 at 6:07 PM, Willy Tarreau <[email protected]> wrote:

> On Fri, Oct 18, 2013 at 05:38:08PM +0200, Steven Le Roux wrote:
> > Great willy as usual :)
> >
> > BUT :)
> >
> > There is still a / I can't remove... : got search=/<arg>  instead of
> > search=<arg>
>
> The "/" is automatically appended because the way the redirect works
> (if no path is found, redirect to "/"). But then we added support for
> prefix-based redirects. Initially it was only used to replace a host
> name or a scheme. Now it's getting uglier because people start to
> rewrite some requests in haproxy to perform redirects. We'll quickly
> run out of simplicity if we go down that route unfortunately. I'd
> suggest that instead you use a solution such as the following which
> seems much cleaner to me :
>
>     reqrep ^GET\ /context/(.*)     GET\ /context/?search=\1
>     redirect code 302 prefix https://host.domain.tldt
>
> Willy
>
>


-- 
Steven Le Roux
Jabber-ID : [email protected]
0x39494CCB <[email protected]>
2FF7 226B 552E 4709 03F0  6281 72D7 A010 3949 4CCB

Reply via email to