Forum Discussion

SS11's avatar
SS11
Icon for Nimbostratus rankNimbostratus
Jul 04, 2019

Add URI in the HTTP Header Replace

We have a request to replace a host header when the pool member is up and URI need to add in the HTTP Header Replace

"xyz.com" {
	if { [active_members test123_pool] > 0 } {
		pool test123_pool
		HTTP::header replace host "abc.com"
		HTTP::uri "/isupport"
}

Can someone review and advise me if any changes.

3 Replies

  • If you want to replace the host xyz.com with abc.com and change the URI to /itsupport, then this iRule snippet is fine.

    Not sure exactly what you mean by "URI need to add in the HTTP Header Replace".

    So can't say for certain is the iRule does what you intend.

    • SS11's avatar
      SS11
      Icon for Nimbostratus rankNimbostratus

      If the host matches XYZ then host header need to replace with abc and isupport need to add as a URI

       

      "xyz.com" - "abc.com/isupport"

      "xyzc.com/test" - "abc.com/isupport"