Forum Discussion
JRahm
Jan 25, 2008Admin
I think this is what you're after in the same context as your v4 rule:
when HTTP_REQUEST {
if { not ([HTTP::host] eq "www.xyzfree.net") } {
if { ([HTTP::host] eq "www.xyzfree.com") \
or ([HTTP::host] eq "www.freexyz.com") \
or ([HTTP::host] eq "www.freexyz.net") } {
HTTP::redirect http://www.xyz.com
} else { HTTP::redirect http://www.xyzfree.net/[HTTP::uri] }
}
else { pool xyzFree }
}
Check through the logic, but I think this is the same thing, only a little more readable (to me):
when HTTP_REQUEST {
if { [HTTP::host] eq "www.xyzfree.net" } {
pool xyzFree
} elseif { ([HTTP::host] eq "www.xyzfree.com") \
or ([HTTP::host] eq "www.freexyz.com") \
or ([HTTP::host] eq "www.freexyz.net") } {
HTTP::redirect http://www.xyz.com
} else { HTTP::redirect http://www.xyzfree.net/[HTTP::uri] }
}