Forum Discussion
Gary_Bristol_19
Nimbostratus
Nov 06, 2015Search External Data Group with default pool with no match
conditions to be met.
1. search External Data Group file for match on pool or redirect. works
2. send the base url to the CMS systems done
3. on external data group miss or something that is more th...
Gary_Bristol_19
Nimbostratus
Nov 06, 2015well it might not be eloquent but i decided i would check for the homepage first then go thru the EDG after the check. Then put the Last entry in the EDG going to the Fall thru pool
when RULE_INIT {
Turn Debug on or off (0=off 1=on)
Turn debug off in prod
set static::redir_debug 0
}
when HTTP_REQUEST {
Use following to match against datagroup
Use following to match against datagroup
set match_string [string tolower [HTTP::host]]
append match_string [string tolower [HTTP::path]]
if {$static::redir_debug}{log local0. "Match String: $match_string"}
Lookup the redirect or pool based upon match_string value
set goto [class match -value [string tolower [HTTP::host][HTTP::path]] starts_with www_ou_edu_redir_class]
if { ([HTTP::host] equals "www.ou.edu") }
if { ([HTTP::uri] equals "") }{
pool www_ou_edu_cms_servers
}
if { [getfield $goto "," 1] equals "pool" } {
if {$static::redir_debug}{log local0. "Pool declaration detected. Going to: [getfield $goto "," 2]"}
pool [getfield $goto "," 2]
} else {
if {$static::redir_debug}{log local0. "Redirect declaration detected. Redirecting to: [getfield $goto "," 2]"}
HTTP::redirect http://[getfield $goto "," 2]
}
}
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