Forum Discussion
JimmyJose
Feb 25, 2016Nimbostratus
Pool selection using iRule
Hello,
An application is hosted on ports 8443 and 8445.
I am trying to achieve the following using iRule.
URL attempted is http://abc.domain.com It should be redirected to https://ab...
Michael_Jenkins
Feb 25, 2016Cirrostratus
If you specify POOL-1 as the default pool, then I'd use the last iRule like this:
when HTTP_REQUEST {
log local0. "Host: [HTTP::host]"
log local0. "URI: [HTTP::uri]"
switch -glob [string tolower [HTTP::uri]] {
"/" {
log local0. " /: Redirect to /123/456"
HTTP::redirect "/123/456"
return
}
"/999/*" {
log local0. " /999/*: Pool POOL-2"
pool POOL-2
}
}
}
If you're having trouble with request, then you could check it from the CLI using
curl
to see if the url works (just to verify it's not a web server issue). So something like curl -k https://:/123/546 -v
(or use http if you're offloading SSL and going HTTP to the web server)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