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:
*
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 sequence abc
. Example: http://www.example.com/page_0-9abcdef.html
.
*.
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 *.
matches pictures
.http://user.pictures.example.com
– the domain mask *.
matches pictures.
and user.
.http://example.com
– the domain mask *.
is interpreted as an empty string.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 addresses www2.example.com
and www.pictures.example.com
.
*
character, the address mask matches the same content that it would match if it started with *.
./
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 form http://www.example.com/abc
, where a
, b
, c
are any characters.
/
character, the address mask matches the same content that it would match if it ended with /*
./*
at the end of an address mask is interpreted as /*
or an empty string.Example: The address mask example.com
matches the addresses http://
example.com
and https://
example.com
.
Example: the address mask http://*.example.com
matches the address http://www.example.com
but does not match the address https://www.example.com
.
*
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).
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. |