Forum Discussion
Need help on uri redirection i-rule
For that many If's, I'd move to a switch statement. Plus it gives you an easy way to OR conditionals. The following will redirect to the straight2axis.axisbank.co.in link. The other two requests ( I was guessing what you wanted to do with the "^" in the second URL btw. You may have to change that ) will pass through as is. All other URI's will pass through as well unless you put something in the default case. If the default case is a passthrough though, you can just omit the two "OR'd" conditions as they will do the same thing as all other URIs.
when HTTP_REQUEST {
switch -glob [HTTP::uri] {
"/useradmin*" -
"/sld*" -
"/nwa*" -
"/index.html*" -
"/irj/go/km/docs/documents*" -
"/monitoring/SystemInfo*" -
"/uddiclient*" -
"/webdynpro/welcome/Welcome.jsp*" -
"/wsnavigator*" {
HTTP::redirect "https://straight2axis.axisbank.co.in/irj/portal"
}
"/irj/go/km/docs/documents/AxisBank/*" -
"/irj/go/km/docs/documents/AxisBank/^*" {
Do nothing - allow to pass through
}
default {
TODO: Do something for all other requests here
}
}
}
Hope this helps...
-Joe
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