Restricting access to certain URI paths not working

Hi,

I want to restrict access to several paths like “/admin” to certain IP addresses and defined the following rule. However, it is not working.

Zones > My Domain > Security > WAF > Custom Rules

(http.request.uri.path contains “/admin” and not ip.src in {123.123.123.123 222.222.222.222})

Then Block

Is the following rule correct? If not, could you please help me resolve this issue?

Thank You,