How to block/allow subpages or strings in the URL using Wildcards.

How to block/allow subpages or strings in the URL using Wildcards.

9148
Created On 09/12/22 12:41 PM - Last Modified 02/15/24 23:53 PM


Objective


  • Customers want to block any website that contains a certain text/subpage using a wildcard in URL filtering.


Environment




Procedure


This is explained by using an example website http://example.com/aaa/bbb.html.
  1. The user wants to allow a website if it contains a certain string bbb.html.
  2. The website contains two layers of subpages. The first part of the page will be denoted by an asterisk (*) followed by the caret (^) to successfully allow/block the website with the string.
  3. For example, */^/bbb.html will block the page http://example.com/aaa/bbb.html as it contains one subpage (/aaa) after the website URL followed by the subpage (/bbb.html) we need to allow/block.
  4. If there are more layers of subpages in the URL, add "^/" to the category, for example, "*/^/^/bbb.html" will block "http://example.com/aaa/ccc/bbb.html"
  5. Asterisks match a greater range of URLs than carets. An asterisk corresponds to any number of consecutive tokens, while a caret corresponds to exactly one token. So, for every additional subpage, an additional caret (^) needs to be added.


Additional Information


  • Do not create an entry with consecutive asterisks (*) or more than nine consecutive carets (^)—entries like these can affect firewall performance.


Actions
  • Print
  • Copy Link

    https://knowledgebase.paloaltonetworks.com/KCSArticleDetail?id=kA14u000000wlWtCAI&lang=en_US&refURL=http%3A%2F%2Fknowledgebase.paloaltonetworks.com%2FKCSArticleDetail&refURL=http%3A%2F%2Fknowledgebase.paloaltonetworks.com%2FKCSArticleDetail