Forum Discussion
DocSmooTH_23746
Nimbostratus
Apr 07, 2008regexp match HTTP::host to choose pool
I couldn't find anything in this forum searching for "regexp http::host" or "regexp matchclass" that fit my problem, but we did get the idea from one of Joe's blog posts.
We have a bunch of ...
DocSmooTH_23746
Nimbostratus
Apr 07, 2008as a note - turning on logging shows that $sid isn't empty.
if I change the regexp to [^([\w-]+).*}, the log quits printing anything, at all, and the default pool is hit for all FQDN hits.
when HTTP_REQUEST {
regexp {^([\w-]+).*} [HTTP::host] sid
if {"" ne $sid } {
if { [matchclass $sid equals $::class_oracle_sids] > 0 } {
pool pool_$sid
} else {
log local0. "[IP::client_addr]:[TCP::client_port] [HTTP::host] $sid no sid matched."
}
} else {
log local0. "[IP::client_addr]:[TCP::client_port] [HTTP::host] sid empty."
}
}
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