Skip to content

http.request.uri.path — Last URI Segment

string

In the console: Last URI Segment

Carries the last segment of the path, not the full path: for a request to /admin/login its value is /login, for /api/v2/users it is /users. Use it to target a file or endpoint name regardless of which directory it lives in.

OperatorDescription
==Exact match
!=Not equal
inIn list
not_inNot in list
containsContains
not_containsDoes not contain
has_prefixStarts with
has_not_prefixDoes not start with
has_suffixEnds with
has_not_suffixDoes not end with
# Block PHP files in any directory
IF http.request.uri.path has_suffix .php
THEN block
# Rate limit login endpoints at every level (/login, /admin/login...)
IF http.request.uri.path == /login
THEN ratelimit 10/60s