Forum Discussion
Gary_Bristol_19
Dec 15, 2015Nimbostratus
ok this is what i ended up with...
when HTTP_REQUEST {
set the variable with the host and path value
set low_host_path [string tolower [HTTP::host][HTTP::path]]
check for ou.edu/
if { $low_host_path equals "ou.edu/" }{
HTTP::redirect "http://www.ou.edu/"
check for www.ou.edu/
} elseif { $low_host_path equals "www.ou.edu/" }{
pool www_ou_edu_cms_servers
} else {
Lookup the redirect or pool based upon match_string value
set goto [class match -value $low_host_path starts_with www_ou_edu_redir_class]
switch [getfield $goto "," 1] {
"pool" { pool [getfield $goto "," 2] }
"redir" { HTTP::redirect [getfield $goto "," 2] }
default { pool ouwww_bostitch }
}
}
}