Forum Discussion
Steve_Sutton_87
Nimbostratus
Apr 29, 2005using matches_regex - strange error
Hi,
I've been trying to create a rule which will detect the user supplying a path with incorrect case and redirect using the correct case for the path. The rule is this:
...
Scott_Tennican_
May 03, 2005Historic F5 Account
The problem is that your regular expression matches the correct uri as well as incorrect ones. So, you never stop redirecting.
Instead, check for the correct uri first.
Adding the code below to the top of your if statement should help.
if (http_uri == "/Epm1") {
use pool main-qa-8080
}
else ...
Also, be aware that the matches_regex operation is very computationally expensive in v4.X. You might check out the tolower() rule function introduced in v4.6.1.
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
