Forum Discussion
VernonWells
Jul 14, 2016Employee
I believe the following is clearer and it avoids multiple expansions of
string to lower [HTTP::host]
:
when HTTP_REQUEST {
if { [HTTP::uri] eq "/" } {
switch [string tolower [HTTP::host]] {
"placeone.com" -
"www.placeone.com" {
HTTP::respond 301 Location "https://www.placetwo.com/subplace/"
return
}
}
}
HTTP::respond 301 Location "https://www.placeone.com[HTTP::uri]"
}
You may also consider using a Local Traffic Policy. This is particularly true if you are running 12.x.