iTP Secure WebServer System Administrators Guide (Version 7.5+)

Table 11 Region Directive Variables (continued)
DescriptionVariable
For information on reverse lookup, see “Region (page 232).
The request is sent by using this port number.REMOTE_PORT
Format:
number between-1-and-65535
For Example:
80
Contains the IP address of the Web client making the
request.
REMOTE_ADDR
For example:
199.170.183.5
Contains the URL path for this request.PATH
For example:
/home/index.html
Contains the query string (the text after the ? in the URL)
for this request.
QUERY_STRING
Contains the method used for the current request. For
example, GET or POST.
METHOD
Contains the minute past the hour (range 0 to 59).MINUTE
Contains the hour in local time (range 0 to 23).HOUR
Contains the day of the week in the form of a numeric
index (range 0 to 6). Sunday is day 0.
WEEKDAY
Contains the day of the month (range 1 to 31).DAY
Contains the month of the year (range 1 to 12).MONTH
Contains the year, measured in years since 1900.YEAR
Contains the contents of any HTTP headers sent by the
Web client. This array variable's indexes consist of the
HEADER
header names, converted to lower- case, with no trailing
colon. For example, the HTTP header User-Agent: would
be stored as HEADER(user-agent).
The IP address of the virtual host for the session.SERVER_ADDR
The number of the port for the session.SERVER_PORT
The name associated with the address on which the
connection was received, as specified by the name
SERVER_NAME
argument of the Accept directive. The name logged is the
value of the -name or -address argument of the Accept
directive; if there is no (symbolic) name or address
argument, the name logged is the host name of the machine
on which the server is running.
Example 1: Time of Day Variables
For example, you can use the YEAR, MONTH, DAY, WEEKDAY, HOUR, and MINUTE variables to
trigger different types of access based on the time of day, as shown in this example:
Region /pictures/* {
if {$HOUR > 7 && $HOUR < 19} {
Redirect /come-back-later.html
Controlling Access to the Server 121