Quantcast
Channel: HAProxy community - Latest topics
Viewing all articles
Browse latest Browse all 4849

Use host to fill in variables in a rule?

$
0
0

Is there a way of using certain portions of a host and injecting them back into a rule? For example, I have this rule:

http-request redirect location https://sub.domain1.tld1/folder/domain2.tld2 code 301 if { hdr(host) -i sub.domain2.tld2 }

Can I pull the sub from the host and place it in the sub in the location, the domain2 from the host and place it into the domain2 in the location, and the tld2 from the host and place it into the tld2 in the location?

Thanks!

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 4849

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>