Forum Discussion
Cindy_127211
Nimbostratus
Apr 09, 2006Rule that redirects based on length of [HTTP::uri]
I have a rule in 4.5 that does the following, but cannot get the same rule to work in version 9.1.1. Can you tell me what I'm doing wrong for the 9.1.1 version?
Thanks!
Version 4....
hoolio
Cirrostratus
Apr 09, 2006I think this should work for you:
rule siebel_redirect_test {
when HTTP_REQUEST {
if { [string length [HTTP::uri]] > 1 } {
pool siebelqa
}
else {
HTTP::redirect "http://[HTTP::host]/fins_enu/"
}
}
}
I think you need to use 'string length' to do the comparison. In 9.x, the 'use' in 'use pool my_pool' has been deprecated in favor of 'pool my_pool'.
I also added a forward slash after [HTTP::host] as there isn't one by default.
Aaron
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