Forum Discussion
JRahm
Jan 24, 2008Admin
I'm not sure I have all your if/else logic right, so check it. Also, I substituted contains for matches_regex to save resources, but this may not meet your needs.
1st rule:
when HTTP_REQUEST {
if {not ([HTTP::host] eq "www.xyz.com") } {
if { [HTTP::host] eq "mobile.xyz.com" } {
HTTP::redirect "http://www.xyz.com/mobile"
} elseif { ([HTTP::uri] contains "xyzfreeconversion.asp") \
or ([HTTP::uri] contains "getconversion.asp") \
or ([HTTP::uri] contains "whoami.asp") } {
pool LAX_ORIGIN_SERVERS
} else { HTTP::redirect http://www.xyz.com/[HTTP::uri] }
} else { pool LAX_ORIGIN_SERVERS }
}
If this works for you, try adjusting the second rule yourself, and if you get stuck, post back.