Forum Discussion

WaterlooSysAdmi's avatar
Dec 03, 2019

iRule - Routing

Hello,

 

Is there a way to use an iRule to route traffic from "test.abc.com" as well as inspect the body of the message for say "productcode" then change the host from "test.abc.com" to "hello.abc.com" and then route the traffic to a certain pool of servers? Basically I need to say if you come from "test.abc.com" and contain "postcode" in the body I'm going to change the host to hello.abc.com and send you to this pool of servers.

 

Any help would be greatly appreciated, stuck on this one.

 

Thank you,

 

 

1 Reply

  • If this is something on XML, there's already a XML routing Irule. Refer to that. If not, this would involve and Irule, where you'll be using HTTP::collect with certain bytes, often the content length. Followed by HTTP::payload to view the payload. And then you can use findstr and check for your string and do the routing. Finally release the collected bytes - HTTP::release