Rules for creating web resource address masks
A web resource address mask ("address mask") can be convenient when a lot of similar addresses of web resources must be entered when creating a web resource access rule. One skillfully-formed address mask can replace a large number of addresses of web resources.
When creating an address mask, the following rules apply:
- The
*
character replaces any sequence of zero or more characters.For example, if you enter the address mask
*abc*
, the web resource access rule applies to all addresses containing the sequenceabc
. Example:http://www.example.com/page_0-9abcdef.html
. - The character sequence
*.
lets you select all domains of an address, i.e. it represents a domain mask. The domain mask*.
is interpreted as any domain name, subdomain name, or an empty string.Example: the following addresses match the
*.example.com
mask:http://pictures.example.com
– the domain mask*.
matchespictures
.http://user.pictures.example.com
– the domain mask*.
matchespictures.
anduser.
.http://example.com
– the domain mask*.
is interpreted as an empty string.
- The character sequence
www.
at the beginning of an address mask is interpreted as the sequence*.
.Example: The address mask
www.example.com
is interpreted as*.example.com
. The mask matches the addresseswww2.example.com
andwww.pictures.example.com
. - If an address mask does not begin with a
*
character, the address mask matches the same content that it would match if it started with*.
. - If an address mask ends with a character other than
/
or*
, the address mask matches the same content that it would match if it ended with/*
.Example: the address mask
http://www.example.com
matches addresses of the formhttp://www.example.com/abc
, wherea
,b
,c
are any characters. - If an address mask ends with a
/
character, the address mask matches the same content that it would match if it ended with/*
. - The character sequence
/*
at the end of an address mask is interpreted as/*
or an empty string. - When web resource addresses are compared to an address mask, the protocol (http: or https:) is taken into consideration.
- If there is no network protocol in the address mask, the address mask matches addresses with any network protocol.
Example: The address mask
example.com
matches the addresseshttp://
example.com
andhttps://
example.com
. - If a network protocol is present in an address mask, only addresses with the same network protocol will match the address mask.
Example: the address mask
http://*.example.com
matches the addresshttp://www.example.com
but does not match the addresshttps://www.example.com
.
- If there is no network protocol in the address mask, the address mask matches addresses with any network protocol.
- An address mask enclosed in double quotes is interpreted without any further substitutions, except for the
*
character if it was initially included in the address mask. For address masks enclosed in double quotes, rules 5 and 7 are not enforced (see examples 14–18 in the table below). - The evaluation of a web resource address mask does not consider the user name and password, connection port, or case.
Examples of applying rules to build address masks
No.
Address mask
Web resource address
Does the address match the address mask?
Comment
1
*.example.com
http://www.123example.com
No
See rule 1.
2
*.example.com
http://www.123.example.com
Yes
See rule 2.
3
*example.com
http://www.123example.com
Yes
See rule 1.
4
*example.com
http://www.123.example.com
Yes
See rule 1.
5
http://www.*.example.com
http://www.123example.com
No
See rule 1.
6
www.example.com
http://www.example.com
Yes
See rules 3, 2, and 1.
7
www.example.com
https://www.example.com
Yes
See rules 3, 2, and 1.
8
http://www.*.example.com
http://123.example.com
Yes
See rules 3, 4, and 1.
9
www.example.com
http://www.example.com/abc
Yes
See rules 3, 5, and 1.
10
example.com
http://www.example.com
Yes
See rules 3 and 1.
11
http://example.com/
http://example.com/abc
Yes
See rule 6.
12
http://example.com/*
http://example.com
Yes
See rule 7.
13
http://example.com
https://example.com
No
See rule 8.
14
"example.com"
http://www.example.com
No
See rule 9.
15
"http://www.example.com"
http://www.example.com/abc
No
See rule 9.
16
"*.example.com"
http://www.example.com
Yes
See rules 1 and 9.
17
"http://www.example.com/*"
http://www.example.com/abc
Yes
See rules 1 and 9.
18
"www.example.com"
http://www.example.com; https://www.example.com
Yes
See rules 9 and 8.
19
www.example.com/abc/123
http://www.example.com/abc
No
An address mask contains more information than a web resource address.