Forum Discussion
Albert__Tase_70
Nimbostratus
Dec 21, 2006need help converting this rule from 4 to 9.2.4
{
if (http_host contains "demo.nature.com" or http_host contains "deutsche.nature.com" or http_host contains "mailart.nature.com" or http_host contains "fastart.nature.com") {
use p...
Dec 21, 2006
Wow, that's a long iRule...
Here's a start of the first part to get you going. You should be able to figure out how to convert the rest from this...
I stored some common values (host, user-agent, and uri) in local lower case variables to avoid multiple comparisons in some places just to account for case sensitivity.
when HTTP_REQUEST {
set host [string tolower [HTTP::host]]
set ua [string tolower [HTTP::header "User-Agent"]]
set uri [HTTP::uri]
if { ($host contains "demo.nature.com") ||
($host contains "deutsche.nature.com") ||
($host contains "mailart.nature.com") ||
($host contains "fastart.nature.com") } {
pool nature
} elseif { ($ua contains "google") || ($ua contains "ask") || ($ua contains "msn") } {
pool spider_pool
} elseif { $host contains "isn-online.org" } {
if { ($uri equals "/") || ($uri equals "/index.html" } {
HTTP::redirect "http://www.nature.com/isn"
} else {
pool Java
}
} elseif { $host contains "www.palgrave-journals.com" } {
if { ($uri equals "/") || ($uri equals "/index.html" } {
HTTP::redirect "http://www.palgrave-journals.com/pal"
} elseif { $uri equals "/mysiteaccount" } {
HTTP::redirect "http://www.palgrave-journals.com/nams/svc/mysiteaccount"
} elseif { ($uri starts_with "/cgi-bin") ||
($uri starts_with "/services/link.taf") ||
($uri equals "/login/login.taf") } {
use pool nature
} ...
} ...
}Good luck and let us know if you get stuck...
-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
