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 d...
Martin_Machacek
Jan 26, 2006Historic F5 Account
Pippin,
your original regular expression is little bit weird, so I first need clarification what it was supposed to match:
^/locmap/*/*aspmatches strings that start with "/locmap" followed by zero or more forward slahes (/) and contain "asp" anywhere after the sequence of forward slashes. So, for example:
/locmap////////gaspingmatches, but:
/locmap/mapdir/mymap.aspdoes not because the regex does not allow any intervening characters between the forward slashes.
I'm assuming (based on your re-factored rule) that you actually wanted:
^/locmap/.*/.*[.]aspIf this is the case, then your suggested rules is correct, assuming that you want to also match URIs like this:
/locmapperwidget/crazymaplocations.asp_and_whatever_hereIf you only want to match URIs that start with "/locmap/" and end with name of one of your ASPs, then your rule needs to look like this:
if (http_uri starts_with "/locmap/" and http_uri ends_with one of map_uri)NOTE: the URI would not match, if it contains any variables "?var=value".
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