Forum Discussion
muzammil_88686
Nimbostratus
Jun 14, 2013HTTP 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?
2 Replies
- nitass
Employee
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"have you tried to add if-statement (to check referer) inside 9.3 switch case? - muzammil_88686
Nimbostratus
nope!
Could you pls suggest one?
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects
