Forum Discussion
Gary_Bristol_19
Nimbostratus
This seems to work but is not as Eloquent as what has been provided from here..
when HTTP_REQUEST {
Lookup the redirect or pool based upon match_string value
if { [string tolower [HTTP::host][HTTP::path]] equals "ou.edu/" }{
HTTP::redirect "http://www.ou.edu/"
}
set goto [class match -value [string tolower [HTTP::host][HTTP::path]] starts_with www_ou_edu_redir_class]
if { [string tolower [HTTP::host][HTTP::path]] equals "www.ou.edu/" }{
pool www_ou_edu_cms_servers
} else {
switch [getfield $goto "," 1] {
"pool" { pool [getfield $goto "," 2] }
"redir" { HTTP::redirect [getfield $goto "," 2] }
default { pool ouwww_bostitch }
}
}
}
Gary_Bristol_19
Dec 15, 2015Nimbostratus
Those pools are where the content resides for specific web pages as defined in an External Data Group File. So the CMS Pool is where the centrally managed University web site lives but the Bostitch is where the Faculty staff web sites live. so depending on the url they would be directed to the specific pool or redirected to a different url, but there are some default actions that need to happen which is why there are the different conditions.