Forum Discussion
dp_119903
Nov 17, 2015Cirrostratus
Help with RegEx
I am having some difficulty forming the correct syntax (or regex) for an irule.
I need to block some specific URI's if they come from a specific data group. The logic works, but the regex doesn...
- Nov 17, 2015
regex in iRule equals bad news. Try something like this:
elseif { [class match [IP::client_addr] equals block_ip] }{ switch -glob [string tolower [HTTP::uri]] { "/user-experience*" { return } "/user*" - "/admin*" { reject } default { return } } }
Brad_Parker
Nov 17, 2015Cirrus
regex in iRule equals bad news. Try something like this:
elseif { [class match [IP::client_addr] equals block_ip] }{
switch -glob [string tolower [HTTP::uri]] {
"/user-experience*" { return }
"/user*" -
"/admin*" {
reject
}
default { return }
}
}
- dp_119903Nov 17, 2015Cirrostratusthat worked well. Thanks
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