Hello @Lakshmi Narayanan ,
Welcome to Microsoft Q&A Platform. Thank you for reaching out & hope you are doing well.
If you want block specific URL on Application gateway, you can use per-site WAF policies with custom rules feature in WAF V2 SKU to block the URL successfully.
Reference : https://learn.microsoft.com/en-us/azure/web-application-firewall/ag/create-waf-policy-ag
https://learn.microsoft.com/en-us/azure/web-application-firewall/ag/per-site-policies
https://learn.microsoft.com/en-us/azure/web-application-firewall/ag/custom-waf-rules-overview
https://learn.microsoft.com/en-us/azure/web-application-firewall/ag/create-custom-waf-rules
Kindly let us know if the above helps or you need further assistance on this issue.
----------------------------------------------------------------------------------------------------------------
Please "Accept the answer" if the information helped you. This will help us and others in the community as well.