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


Reply via email to