Forum Discussion
Skuba_85554
Nimbostratus
Jun 05, 2009is this irule ok?!
i've used the irule editor to check but it doesn't seem to be working correctly i.e. www.mainsite.com doesn't work but www.mainsite.com/subsite does work!...
when HTTP_REQUEST {
if { [string tolower [HTTP::uri]] starts_with "/subsite" or "/subsites"} {
pool subsite_pool
}
else {
pool main_pool
}
}
the previous irule worked fine but didn't do everything we needed...
when HTTP_REQUEST {
if { [HTTP::uri] starts_with "/subsite"} {
pool subsite_pool
}
else {
pool main_pool
}
}
this has knocked out one of our production web sites so i'd appreciate any input
many thanks
- Skuba_85554
Nimbostratus
i think i've solved it with the following irule... - Colin_Walker_12Historic F5 AccountYou were close with your initial attempt. Whenever you're using a logical operator like or, you have to repeat the comparison operator as well. Like this:
when HTTP_REQUEST { if { ([string tolower [HTTP::uri]] starts_with "/subsite") or ([string tolower [HTTP::uri]] starts_with "/subsites")} { pool subsite_pool } else { pool main_pool } }
when HTTP_REQUEST { if { [string tolower [HTTP::uri]] starts_with "/subsite"} { pool subsite_pool } else { pool main_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