The <Client> tag is used to limit execution of a set of directives to requests received from specific clients. Directives listed between the <Client> and </Client> tags are executed only when information in the client request matches the parameter values specified.
The following table lists the <Client> tag parameters.
Table 1–1 Client Tag Parameters
The <Client> tag parameters provide greater control over when and if directives are executed. In the following example, use of the odds parameter gives a request a 25% chance of being redirected:
<Client odds="25%"> NameTrans fn="redirect" from="/Pogues" url-prefix="http://pogues.example.com" </Client>
One or more wildcard patterns can be used to specify Client tag parameter values.
Wildcards can also be used to exclude clients that match the parameter value specified in the <Client tag>. In the following example, the <Client> tag and the AddLog directive are combined to direct the Web Server to log access requests from all clients except those from the specified subnet:
<Client ip="*~192.85.250.*"> AddLog fn="flex-log" name="access" </Client>
Using the ~ wildcard negates the expression, so the Web Server excludes clients from the specified subnet.
You can also create a negative match by setting the match parameter of the Client tag to none. In the following example, access requests from the specified subnet are excluded, as are all requests to the virtual server www.sunone.com:
<Client match="none" ip="192.85.250.*" urlhost="www.sunone.com">AddLog fn="flex-log" name="access"</Client>
For more information about wildcard patterns, see Chapter 9, Using Wildcard Patterns.