Forum Discussion
yuanqiang_22112
Nimbostratus
May 09, 2016irules for different pool
Hi
please look this irules:
when HTTP_REQUEST {
if { [HTTP::uri] contains "login" } {
pool pc
} elseif { [HTTP::uri] contains "hfs" } {
pool pc2
} else {
pool dns
}
}
now I take a ...
Kevin_Stewart
Employee
May 09, 2016You first have to understand all of the parts of a URL. So for example:
http://www.domain.com/images/mycat.png?foo=bartest
www.domain.com is the host, so that's accessible with the [HTTP::host] or [HTTP::header Host] command
/images/mycat.png?foo=bar is the "URI", so that's accessible via the [HTTP::uri] command
/images/mycat.png is the path, so that's accessible via the [HTTP::path] command
?foo=bar is the query, so that's accessible via [HTTP::query]
So to answer your question, "login.txhd.com" isn't matching your [HTTP::uri] match because "login" isn't in the URI, it's in the Host.
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