Wildcards and regular expressions in URL
Wildcards
Kerio Control allows using wildcards when you create a content rule based on a URL or a URL group:
- Select the HTTPHypertext Transfer Protocol - protocol for exchange of hypertext documents in HTML. URL option.
- In the Site field, write the URL.
Use substrings with special characters —
*
and?
. An asterisk (*
) stands for any number of characters, a question mark (?
) represents one character. - Click OK.
Examples:
www.example.com/index.html
— a particular pagewww.*
— all URL addresses starting withwww.
*exploit*
— all URL addresses containing theexploit
string*warez??.cz*
— all URL addresses containing such strings aswarezzz.cz
,warez99.cz
, etc.
Do not select the HTTP URL by regular expression option, if you want to use only wildcards.
Regular expressions
Kerio Control allows you to use regular expressions when you create a content rule based on a URL or a URL group:
- Select the HTTP URL by regular expression option.
- In the Site field, write the regular expression. Kerio Control uses Perl Regular Expression Syntax. For complete specification, go to http://www.boost.org.
- Click OK.
Example:
Type facebook\.com.*
in the Site field if you want to create a content rule for all URL addresses that contain facebook.com
.