The Client Tag

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.

Client Tag Parameters

The following table lists the <Client> tag parameters.

Table 1–1 Client Tag Parameters

Parameter

Description

browser

User-agent string sent by a browser to the Web Server

chunked

Boolean value set by a client requesting chunked encoding

code

HTTP response code

dns

DNS name of the client

internal

Boolean value indicating internally generated request

ip

IP address of the client

keep-alive

Boolean value indicating the client has requested a keep-alive connection

keysize

Key size used in an SSL transaction

match

Match mode for the <Client> tag; valid values
are all, any, and none

method

HTTP method used by the browser

name

Name of an object as specified in a previous NameTrans statement

odds

Sets a random value for evaluating the enclosed directive; specified
as either a percentage or a ratio (for example, 20% or 1/5)

path

Physical path to the requested resource

ppath

Physical path of the requested resource

query

Query string sent in the request

reason

Text version of the HTTP response code

restarted

Boolean value indicating a request has been restarted

secret-keysize

Secret key size used in an SSL transaction

security

Indicates an encrypted request

type

Type of document requested (such as text/html or image/gif)

uri

URI section of the request from the browser

urlhost

DNS name of the virtual server requested by the client (the value is
provided in the Host header of the client request)

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:

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:

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: