Forum Discussion
pwallace_110041
Nimbostratus
Jan 25, 2006Double check of rule to get rid of regex.
I am in need of a rule review. I am trying to come up with an alternative to the rule below with matches_regex in it. I need it to have the same end result but I am trying to avoid using the regex due to the cpu hit this can have.
if (http_uri matches_regex "^/locmap/*/*asp") {
use pool mappool
}
else {
discard
}
=====================================================
Below is the rule that I was working on to replace the regex rule. May I please get some feed back on the rule below to see if this will work and give the same results as the regex rule above. Thank you ~ Pippin
class map_uri {
"maplocation.asp"
"maplocation2.asp"
"maplocations.asp"
"movelocation.asp"
"palm.asp"
"printrouteresults.asp"
"routeresult.asp"
}
if (http_uri starts_with '/locmap' and http_uri contains one of map_uri) {
use pool mappool
}
else {
discard
}
3 Replies
Sort By
- Martin_MachacekHistoric F5 AccountPippin,
^/locmap/*/*asp
/locmap////////gasping
/locmap/mapdir/mymap.asp
^/locmap/.*/.*[.]asp
/locmapperwidget/crazymaplocations.asp_and_whatever_here
if (http_uri starts_with "/locmap/" and http_uri ends_with one of map_uri)
- pwallace_110041
Nimbostratus
Why would the following be true? - Martin_MachacekHistoric F5 AccountAnswer 1 (Why would the following be true?):
http_uri starts_with "/locmap/" and tolower(http_uri) ends_with one of map_uri
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