Forum Discussion
Samir_Jha_52506
Noctilucent
Apr 11, 2015iRule help require
Hi, I don't see any mistake in this iRule. can any one advice?
when HTTP_REQUEST {
set RequestedPath [string tolower [HTTP::path]]
switch $RequestedPath {
"/boo" {
HTTP::redirect "http://xyz.com"
}
"/manag" {
HTTP::redirect "http://xyz.com"
}
"/check" {
HTTP::redirect "http://xyz.com"
}
} }
4 Replies
- kunjan
Nimbostratus
hi Samir, what's not working.?
- Samir_Jha_52506
Noctilucent
URL redirection is not happening.
- nitass
Employee
URL redirection is not happening.
does request's uri exactly match the switch uri (i.e. /boo, /manag or /check)?
you know default is exact match, don't you?
iRules 101 - 04 - Switch by Joe Pruitt
https://devcentral.f5.com/articles/irules-101-04-switch - Samir_Jha_52506
Noctilucent
Thanks guys.. Problem solved
when HTTP_REQUEST { if { [HTTP::uri] starts_with "/boo/" || [HTTP::uri] starts_with "/manag/" || [HTTP::uri] starts_with "/check/" } { HTTP::redirect http://xyz.com } }
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