Hi again,
Le 11/04/2014 21:30, Cyril Bonté a écrit :
I see several issues :
1. In order to not break older configurations, "redirect" will not
support dynamic values, "http-request redirect" does.
2. Avoid spaces between parameters (between map and hdr).
3. Parameters are declared in the wrong order.
4. The URL is not a header, you can try with "path" instead.
Can you retry with :
http-request redirect location
%[path,map(/opt/local/etc/haproxy/redirect.map)] code 301
To complement, I believe you will have urls that don't require
redirects. Then a more complete line would be :
http-request redirect location
%[path,map(/opt/local/etc/haproxy/redirect.map)] code 301 if {
path,map(/opt/local/etc/haproxy/redirect.map) -m found }
--
Cyril Bonté