Forum Discussion

Sams_88783's avatar
Icon for Nimbostratus rankNimbostratus
Jan 25, 2012

Irule help

We have 2 IIS servers and 2 Apache servers and we are looking for is a way to separate two types of traffic (IIS versus Apache) and send the traffic to different pools.while discarding everything else. It will probably make sense to create two variables; one to list the IIS URLs and the other to list the Apache URLs; as part of this as well.



I have created irule as below:






if { [HTTP::host] equals ""} {


use pool iis_hosting_pool






else if {[HTTP::host] equals ""} {



use pool apache_hosting_pool






else {












But this is giving syntax error.There will be multiple URLs that will fall in to each category.In version 4.x there is a variable concept, but not finding in 9.x.



Please help urgent.


1 Reply

  • If you want to assign a pool based on the http uri, why not just use an httpclass profile? That's exactly what they are there for.



    Also if you have a list of hosts, you wouldn't use a normal variable, you'd probably want to store them in data group lists and then use a class match operation to find a match. Plenty of examples around, such as this: