iTP Secure WebServer System Administrators Guide (Version 7.5+)

value
is the value to which you are setting this variable.
Returning to the earlier example, you could accomplish the same result using the following
RegionSet directive:
RegionSet denyList "*.widgets.com *.compedia.com *.foo.com"
Region /admin/* {
DenyHost $denyList
}
Region /testing/* {
DenyHost $denyList
}
If you subsequently needed to change your deny-access list, you would only need to change it in
the RegionSet directive.
Using Conditional Commands
You can use the Tcl if command to specify the conditional execution of commands in a Region
directive. (See “Tool Command Language (Tcl) Basics” (page 276), for details about the Tcl
language.) The if statement has this syntax:
if condition {
if-true
} else {
if-false
}
If condition is non-zero (indicating true), the if-true statement is executed; otherwise, the
if-false statement (in the else clause) is executed. (The else clause is optional.)
For example, suppose that you want to redirect requests from any host in the widget.com domain
to /widget-welcome.html while not affecting requests from any other domain. You can use
the Tcl if statement with the Tcl HostMatch command, as:
Region / {
if [HostMatch *.widget.com] {
Redirect /widget-welcome.html
}
}
In this example, the Region directive redirects home-page requests from *.widget.com to a
special home page. (The Tcl HostMatch command is discussed in detail in “Configuration
Directives” (page 198).)
Using Tcl Variables
You can use Tcl variables in Region directives to give commands certain information about a
request, such as time of day, the Web client host name, or the HTTP header information. Then the
commands can use this information to modify the behavior of the request.
Table 11 (page 120) lists the variables you can use in Region directives, except the variables used
for anonymous sessions, which are described in Anonymous Ticket Attributes” (page 242).
Table 11 Region Directive Variables
DescriptionVariable
Contains the name of the Web client making the request.
If no reverse lookup is available, this variable is blank.
REMOTE_HOST
For example:
aegean.compedia.com
120 Configuring the iTP Secure WebServer