I would like to provide F5 iRule that check HTTP host and uri for forward to select pool,

So i think some use case or application service requirement we have to use solution iRules

to check condition HTTP header for forward to select pool (Servers)

when HTTP_REQUEST {

set httphost [string tolower [HTTP::host]]

set httpuri [string tolower [HTTP::uri]]

if { ($httphost contains “x1”) && ($httpuri contains “y1”) } {

pool pool1

} elseif { ($httphost contains “x2”) && ($httpuri contains “y2”) } {

pool pool2

} else {

pool pool3

}

}
F5 iRules check HTTP Host and URI

In this case we have 3 pools and we create iRules for match 3 condition

  1. HTTP host = x1 and HTTP uri =y1, F5 forward traffic to pool1
  2. HTTP host = x2 and HTTP uri =y2, F5 forward traffic to pool2
  3. Not match any condition that f5 Forward to default pool = pool1

 945 total views,  1 views today

Related Posts

  • In this topic, we would like to provide example IRULES for function F5 LTM that check HTTP uri and select pool, This solution help you to manage HTTP Traffic and forward traffic to pools In this example IRULES below, when users request with www.test.com/example1234, F5 detect HTTP uri = example1234…
    Tags: http, irules, pool, uri, forward, check, condition, ltm
  • In this topic we would like to provide solution iRules check condition that match with HTTP referrer and redirect traffic, in case not match any thing F5 will action forward traffic to specific pool Example Diagram F5 iRules check HTTP referrer and redirect traffic iRules code when HTTP_REQUEST {if {…
    Tags: http, pool, irules, check, forward, networks
  • In this topic about solution F5 using iRules to check source client IP address from HTTP header x-forward-for and f5 query IP address from x-forward-for to geo-database for check country name, In case match with blacklist country, F5 action drop packet from client Step1: Diagram Traffic flow for this case…
    Tags: irules, check, ltm, networks
  • Step1: Access F5 with serial console that board rate = 9600 with cable RS232 convert USB to RJ45 or direct connect with UTP from computer to F5 and management F5 with default IP 192.168.1.245/24 Step2: Login with default users GUI (admin/admin), Command line (root/default) Step3: Change management IP address, Run…
    Tags: networks, ltm

Categories: