Forum Discussion
Kai_Wilke
Dec 15, 2015MVP
Hi Gary,
its indeed not an easy task without changing the entire data group structure... š
The script below is the best I can do for you...
when HTTP_REQUEST {
set low_host_path [string tolower [HTTP::host][HTTP::path]
if { $low_host_path equals "ou.edu/" } then {
HTTP::redirect "http://www.ou.edu/"
} elseif { $low_host_path equals "www.ou.edu/" } then {
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 -exact -- [getfield $goto "," 1] {
"pool" { pool [getfield $goto "," 2] }
"redir" { HTTP::redirect [getfield $goto "," 2] }
default { pool ouwww_bostitch }
}
}
}
Cheers, Kai