iTP Secure WebServer System Administrator's Guide (iTPWebSvr 6.0+)
Tool Command Language (Tcl) Basics
iTP Secure WebServer System Administrator’s Guide—523346-002
E-2
Tcl Syntax Rules
•
Multiple arguments in a command are separated by spaces or tabs.
For example, the following Filemap configuration directive has two arguments
separated by tabs:
Filemap /personal/unerd/ /udir/unerd
•
If an argument itself contains spaces or tabs, it must be delimited with either
double quotation marks (") or curly braces ({}). If you delimit an argument with curly
braces, no command or variable substitution (described below) will occur within the
argument.
For example:
Message error-forbidden {
<TITLE>Access Denied</TITLE><H1>Access Denied</H1>
You have been denied access.
}
•
Arguments delimited with curly braces can be nested. These arguments can
consist of commands.
For example:
Region / {
if [HostMatch *.widget.com] {
Redirect /widget-welcome.html
}
}
•
Multiple commands are separated by semicolons or by end-of-lines.
For example:
puts stdout "Hello world!" ; exit
•
The backslash ( \ ) character indicates that the next character is to be interpreted
literally. This feature is useful for including special characters (such as $, [, and ]) in
command arguments. A backslash at the end of a line indicates that the command
is continued on the next line.
For example:
DenyHost *.openmarket.com *.foo.com *.bar.com *.widgets.com \
*.unerd.org
•
A dollar sign prefixed to a variable name indicates variable substitution: the value
of the named variable is substituted for its name.
For example, in the following example, the path resolves to
/httpd/logs/httpd.log:
set root /httpd
ExtendedLog $root/logs/httpd.log