leozou_80567
Oct 30, 2008Historic F5 Account
use iRule to pickup http traffic form any:any VS
Hi
Our customer use virtual server 0.0.0.0:0 , they hope use iRule to pickup http traffic to a pool(many http traffic don’t use 80 port,so they can’t create 0.0.0.0:80 Vs to do it), other’s traffic will forwarding.
We want to treat all traffic as http first, So we creat VS:0.0.0.0:0 http profile, and use below iRule:
when RULE_INIT {
set ::httplog 1
}
when HTTP_REQUEST {
if { [string toupper [HTTP::uri]] eq "" } {
Proxy connect method should continue as a passthru
if {$::httplog}{log local0. " forward IP"}
HTTP::disable
forward
return
}
if {$::httplog}{log local0. " SELECT HTTP_Proxy_Pool"}
pool HTTP_Proxy_Pool
}
if the traffic is http traffic ,it is ok. But if the traffic is no http traffic,the iRule don't work.
Would anyone give some advise about this? Thanks!!!