Hi, On Fri, Mar 08, Philipp Kolmann wrote: > On 3/8/19 2:50 PM, Patrick Hemmer wrote: > > > >You can use external files in two cases. See the following blog articles: > > > >https://www.haproxy.com/blog/introduction-to-haproxy-acls/ (search > >for "acl file") > > > >https://www.haproxy.com/blog/introduction-to-haproxy-maps/ > > thanks for the hint with the maps. This looks quite promising for my > other issue I am facing: > > acl mandant_IT_email path_beg -i /it/Service-One > http-request redirect code 302 location "/long/URL/84" if > mandant_IT_email > > Is there any possibility to achive such a redirect if path_beg via maps? > > http-request redirect code 302 location *value* if path_beg *key > *
Yes(probably:), something like this might work for you: acl is_redirect_match path,map_beg(redir.map) -m found http-request redirect code 302 location %[path,map_beg(redir.map)] if is_redirect_match and in the redir.map file: /a/b /ab/somewhere /a/c /ac/somewhere /a1/b /a1b/somewhere -Jarno -- Jarno Huuskonen

