Forum Discussion
Clint_Byrum_103
Nimbostratus
Mar 16, 2006Simple HTTP::uri rule doesn't work as expected
I'm very new to iRules, just got our LTM recently.
I setup a rule like this:
when HTTP_REQUEST {
if {[string tolower [HTTP::uri]] starts_with "/jsfeatured.php"} {
pool...
Mar 16, 2006
You are doing everything correctly and it should work. The value HTTP::uri does not contain any header values so odds are something else is amiss.
I would start by throwing in some logging
when HTTP_REQUEST {
log local0. "Requested URI: [HTTP::uri]"
if {[string tolower [HTTP::uri]] starts_with "/jsfeatured.php"} {
log local0. "URI: [HTTP::uri] matched /jsfeatured.php"
pool jsfeatured_pool_80
} elseif {[string tolower [HTTP::uri]] starts_with "/js.php"} {
log local0. "URI: [HTTP::uri] matched /js.php"
pool jobsearch_pool_80
} else {
log local0. "URI: [HTTP::uri] not matched"
}
}Then look in the /var/log/ltm file and you'll see the output of the log messages. In most cases, watching the logic flow can help diagnosing these problems.
Stupid question, but could the jsfeatured_pool_80 be the default pool for the virtual? If so, not overriding in the iRule would route there.
-Joe
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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