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 } }

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.

Best regards.