title: How do I used the map feature in haproxy to build massive redirect tables 1.5
body: <p>I think the subject covers it. I need to build a list of many 301 redirects within the same domain i.e. redirect /some_old_place to /some_new_place. We have lots of content the gets retired or replaced based on uri. The quote from the current home page of haproxy states maps may be used to "build massive redirect tables" but for the life of me I can figure it out. I am using version 1.5 and here are the lines of the config which I am currently am working on. </p>
  
  <pre><code>    redirect location %[map(/opt/local/etc/haproxy/redirect.map), hdr(url)] code 301
  </code></pre>
  
  <p>Given the above config line I get </p>
  
  <pre><code>[ALERT] 099/205518 (27981) : parsing [/opt/local/etc/haproxy/haproxy.cfg:83] : error detected in frontend 'LoadBalancer' while parsing redirect rule : expects 'code', 'prefix', 'location', 'scheme', 'set-cookie', 'clear-cookie', 'drop-query' or 'append-slash' (was 'hdr(url)]').
  </code></pre>
  
  <p>I have tried many variations of this but have not found any success. If anyone knows how to do this please let me know? </p>