On Wed, May 28, 2014 at 11:57 AM, Matt . <[email protected]> wrote:

> The normal redirect is working but convirt it to a rewrite is where I'm
> stuck.
>
> Should I use an ACL upfront that looks in the map and do an if on that
> or is the ACL not needed at all ?
>


The example in the "reqirep" section of the documentation seems to mostly
do what you're asking.


http://cbonte.github.io/haproxy-dconv/configuration-1.5.html#reqirep

Does that not work?

This will rewrite "foo.com/baz.jpg" -> "newdomain.com/com/foo/baz.jpg"

  reqirep ^Host:\ foo.com Host:\ newdomain.com
  reqirep ^GET\ /(.*) GET\ /com/foo/\1




-Bryan

Reply via email to