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:

  1. Select the HTTPHypertext Transfer Protocol - protocol for exchange of hypertext documents in HTML. URL option.
  2. 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.
  3. Click OK.

Examples:

  • www.example.com/index.html — a particular page
  • www.* — all URL addresses starting with www.
  • *exploit* — all URL addresses containing the exploit string
  • *warez??.cz* — all URL addresses containing such strings as warezzz.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:

  1. Select the HTTP URL by regular expression option.
  2. In the Site field, write the regular expression. Kerio Control uses Perl Regular Expression Syntax. For complete specification, go to http://www.boost.org.
  3. 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.