Description | This article describes how to block all sub-directories of a site using Regular Expression (Regex). |
Scope | FortiGate URL Filter. |
Solution |
This step requires Deep packet inspection to be enabled: Technical Tip: 'certificate-inspection' and 'deep-inspection' for URL filtering.
Using Wildcard will result in the domain being blocked even if '/' is not in the main URL. For example, the following URL filter will be blocked even though the accessed site does not contain '/':
This Regular Expression (Regex) is required in this case. The following Regex is used: 'lowyat\.net/.+'.
Result:
Related articles: Technical Tip: URL Filter expressions for the FortiGate Technical Tip: Using a static URL filter feature to allow/block web sites |