Forum Discussion
uri blocking using negative "not end with"?
I am very weak at irules and appreciate any help. The logic is: If (http request) does NOT include a trailing / in url https://beta.example.com/BOE/BI then stop the traffic. Else Continue
Is there an option to use a "not end with"? Something like the below?
when HTTP_REQUEST { if { ( [string tolower [HTTP::path]] not end with "/" ) } { TCP::close } }
- cjunior
Nacreous
Hi, It's easy as you can see:
when HTTP_REQUEST { if { not ( [HTTP::path] ends_with "/" ) } { reject } }
I changed it to "reject" because sounds better to me, ok?
As a tip of mine, when do you need to find commands here on DC, try to search those words plus wiki e.g. "not wiki", "TCP::close wiki", "operators wiki", "reject wiki" and you be saved.
https://devcentral.f5.com/wiki/irules.not.ashx
https://devcentral.f5.com/wiki/irules.tcp__close.ashx https://devcentral.f5.com/wiki/irules.reject.ashx https://devcentral.f5.com/wiki/irules.operators.ashxBest regards.
Recent Discussions
Related Content
* 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