How to block a specific url in Application Gateway

Rakesh Sharma 61 Reputation points
2023-06-02T14:55:05.96+00:00

Hi Team,

I have app gateway setup and its working smoothly : https://example.com

But there is a request from client that i need to block a following site.

https://example.com/ideas.txt

How can i achieve this on application gateway?

Azure Application Gateway
Azure Application Gateway
An Azure service that provides a platform-managed, scalable, and highly available application delivery controller as a service.
1,007 questions
{count} vote

1 answer

Sort by: Most helpful
  1. KapilAnanth-MSFT 40,581 Reputation points Microsoft Employee
    2023-06-05T14:37:51.06+00:00

    @Rakesh Sharma

    Welcome to the Microsoft Q&A Platform. Thank you for reaching out & I hope you are doing well.

    I understand that you would like to block users from accessing a page in your site, constoso.com/test.txt

    For the context, we can consider your site as www.contoso.com.

    I can think of two methods to prevent users from accessing www.contoso.com/test.txt

    Method1 : Using URL Rewrite

    Method2 : Use a Custom Rule

    It must be noted that WAF rules are used to DENY/ALLOW Request based on client properties generally

    In case you have a page /test.txt and you do not want users to access this, it is recommended that you must remove this from your site.

    Kindly let us know if this helps or you need further assistance on this issue.

    Thanks,

    Kapil

    Please l

    0 comments No comments