Nathan_McMahon_
Feb 21, 2006Historic F5 Account
When to use HTTP::uri vs HTTP::path, contains vs matches
When should I be using the HTTP::uri versus the HTTP::path in an iRule? Second part of the question is should I be using a "contains" or "matches" for the following...
Sample uri, http://www.test.com/dir/page.php?=data
when HTTP_REQUEST {
if { [HTTP::uri] contains "php" } {
pool php_pool
}
}
when HTTP_REQUEST {
if { [HTTP::path] contains ".php" } {
pool php_pool
}
}
If I want to do pool selection based on the content type, in this case it's a php, which would be the least cpu expensive route? Since the URI may not end with "php" would this need to be a contains or is there another method that is recommended?
Thanks in advance!