Forum Discussion
Jangle-Man_1290
Nimbostratus
Sep 19, 2014iRule - Direct traffic to specific pools based on host and URI
Good Afternoon,
I am struggling to find a winning combination for the following process.
The default Virtual Server pool is different and required for all other sites.
Step 1 - The website www....
Brent_West_7733
Sep 19, 2014Historic F5 Account
Maybe something like this would help?
when HTTP_REQUEST {
set debug 1
set client_info "[IP::client_addr]:[TCP::remote_port]: [HTTP::host][HTTP::uri]"
if { $debug } {
log local0. "$client_info requests [HTTP::host] and [HTTP::uri]"
}
if { [string tolower [HTTP::uri]] starts_with "/login" } {
if { $debug } { log local0. "$client_info - line 9 selected - pool is Pool_Admin_64" }
pool Pool_Admin_64
}
elseif { [string tolower [HTTP::uri]] starts_with "/lz/" } {
if { $debug } { log local0. "$client_info - line 14 selected - pool is Pool_Landing_64" }
pool Pool_Landing_64
}
elseif { [getfield [string tolower [HTTP::host]] ":" 1] eq "www.communigator.co.uk"} {
if { $debug } { log local0. "$client_info - line 19 selected - pool is Pool_Website" }
pool Pool_Website
}
else {
if { $debug } { log local0. "$client_info - line 24 selected - No Match, using default" }
}}
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