muzammil_88686
Jun 14, 2013Nimbostratus
HTTP Referer
Dear Dev Team,
The iRule is working fine. But I want to get the requests to be forwarded to "Pool2" if the user who is coming from the subnet(9.3*) and the HTTP Referer value is "http://www.test.com/UK"
when HTTP_REQUEST {
if {([HTTP::header exists "X-Forwarded-For"]) and ([string tolower [HTTP::uri]] equals "/maxi/homepage.do")} {
switch -glob [HTTP::header values "X-Forwarded-For"] {
"9.23*" {
HTTP::redirect "http://www.test.com/MaXi/homePage.do?src=US"
return
}
"9.3*" {
HTTP::redirect "http://www.test.com/UK"
return
}
"9.102.*" {
HTTP::redirect "http://www.test.com/MaXi/homePage.do?src=US"
return
}
}
}
elseif {[string tolower [HTTP::uri]] starts_with "/maxi"} {
pool Pool2
}
}
Could you pls suggest?