this should be a pretty simple rewrite rule, but I can't get it working. I want to rewrite Request as follows:
http://acme.org/FOO/BAR
to
http://FOO.acme.org/BAR
FOO
is some simple string in this case and BAR
should match the rest of the URL. It seems as reqrep
does not allow the rewrite of the host :(
But nowadays it's better to replace host with
http-request replace-header Host .* FOO.acme.org
since reqirep is deprecated since haproxy 1.6.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With