Forum Discussion
Andrew_Watson_1
Feb 24, 2014Nimbostratus
Pool selection with uri rewrite for Ellucian Banner
Hello!
I am fairly new to the f5 and LBs in general. We have several back end servers that are currently serving multiple websites on different TCP ports. We are looking to load balance these ...
- Feb 25, 2014
Sorry forgot the sample datagroup;
ltm data-group internal dg_path_list { records { "/forms" { data "pool pl_foo.com_8888" } "/reports" { data "pool pl_foo.com_9002" } "/SSB" { data "rewrite /test" } } type string }
IheartF5_45022
Feb 24, 2014Nacreous
Add a datagroup;-
and an iRule (untested but you should get the idea);
when HTTP_REQUEST {
Match request path against datagroup and extract both key and value
set ele [class match -element [string tolower [HTTP::path]] starts_with $dg_path_list]
Switch on element value
switch -glob [lindex $ele 1] {
"pool *" {
if {[catch {pool [getfield [lindex $ele 1] " " 2]}]} {
Error in datagroup - pool does not exist
HTTP::respond 500 noserver
}
return
}
"rewrite *" {
Check rewrite path valid
if {[getfield [lindex $ele 1] " " 2] starts_with "/"} {
Substitute match path (key) with rewrite value from element value
HTTP::uri "[getfield [lindex $ele 1] " " 2][substr [HTTP::uri] [string length [lindex $ele 0]]]"
} else {
Error in datagroup - path not valid
HTTP::respond 500 noserver
}
}
default {
Do nothing
}
}
}
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