Forum Discussion
Redirection iRule is going in loop
Dear Team,
We have the below two iRules.
===
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
}
}
===
when HTTP_REQUEST priority 10 {
switch -glob [HTTP::uri] {
"/MaXi*" { pool Pool2}
default { pool Pool1 }
}
}
===
Redirection for 9.23* and 9.102.* are working fine without any issues.
Even for the 9.3* redirection is working fine and the user is getting the page "http://www.test.com/UK" successfully. But there is tab (URL "http://www.test.com/MaXi/homePage.do") on the page when he clicks it is taking him to same page i.e "http://www.test.com/UK"
Could you pls help and sugest if anything is wrong on the iRules?
3 Replies
- muzammil_88686
Nimbostratus
Dear Team,
Could you pls suggest me? - muzammil_88686
Nimbostratus
anyone suggest...? - muzammil_88686
Nimbostratus
Dear Dev Team,
Could you pls give your expert suggestion?
Best Regards,
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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