Forum Discussion
Dev_16_371257
Nimbostratus
Sep 05, 2018Need help In irule to execute condition based on URI Values
Hi Experts,
I am trying to write the I-rule where uri have 10digit numeric value and it should not contain any special character/alphabet , also the length of that numeric value is not more than 10...
jaikumar_f5
Noctilucent
Sep 05, 2018Try this too,
when HTTP_REQUEST {
set split ""
set split [getfield [getfield [HTTP::uri] "sn=" 2] "/" 1]
if { [string is digit $split] && [string length $split] == 10 && ([HTTP::uri] ends_with ".docx" || [HTTP::uri] ends_with ".xlsx")} {
HTTP::respond 200 content {
success
}
} else {
HTTP::respond 200 content {
failed
}
}
}
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