Forum Discussion
nelson_ge_10908
Jan 31, 2005Historic F5 Account
How to log URL with iRule
I am load balancing 2 proxy servers with widecard vip and need to log the client IP and the URL with iRule. Does this rule look right?
when HTTP_REQUEST {
if {[IP::local_addr] equals 0.0.0.0}
log local7.info remote_addr URI::basename
}
- nelson_ge_10908Historic F5 AccountYes this help, thanks.
- nelson_ge_10908Historic F5 AccountSorry, I meant destination_URL=www.xyz.com instead source_ip=1.2.3.4?
- unRuleY_95363Historic F5 AccountPretty simple, you get at the destination Host via the [HTTP::host] command. So, in a rule:
when HTTP_REQUEST { if { [HTTP::host] eq "www.xyz.com" } { pool xyz_pool } }
when HTTP_REQUEST { if { [domain [HTTP::host] 2] eq "xyz.com" } { pool xyz_pool } }
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects