Forum Discussion
aschi_6586
Nimbostratus
Oct 31, 2013Regular Expression
Hi
I just want that the following Path are valid and sent to the Pool, otherwise the "Forbidden" Message should appear.
/manorbon
/manorbon/
/manorbon/anything
I tested the regex "/manorbo...
Kevin_Stewart
Employee
Oct 31, 2013Perhaps then a data group:
when HTTP_REQUEST {
if { [class match [string tolower [HTTP::uri]] starts_with dc-uri-filter-dg] } {
set local_var [class match -name [string tolower [HTTP::uri]] starts_with dc-uri-filter-dg]
if { ( [string tolower [HTTP::uri]] equals $local_var ) or ( [string tolower [HTTP::uri]] starts_with "${local_var}/" ) } {
SSL::disable serverside
pool ACA-Pool_appl.com_http
} else {
HTTP::respond 200 content "Forbidden"
}
}
}
where "dc-uri-filter-dg" is a string-based data group that contains the base URI. Example:
"/manorbon" := ""
"/foo" := ""
"/bar" := ""
"/test" := ""
The iRule will match only the defined base URI (equals) or the base URI plus a "/" (starts_with).
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