Deny request base on http request url

I want to deny a request if it is accessing only a specific URL.

eg:-
Let us say we have these URLs
/URL/A
/URL/B
/URL/C
/URL/D

I want to block an IP if found only accessing /URL/D. If found accessing other URLs, then previous deny should be removed.

Is this possible to do?

No, you cannot ACL match things based on previous requests.