iTP Secure WebServer System Administrator's Guide (iTPWebSvr 6.0+)
Configuring the iTP Secure WebServer
iTP Secure WebServer System Administrator’s Guide—523346-002
7-34
Enabling Automatic Directory Indexing
2. You can use a Redirect command with the -replace option to redirect requests
to an alternate location that has the same file structure as the original location:
Redirect [-replace /replace-spec] alt-rl
When you specify the -replace option, the URL path element specified by
/replace-spec is removed from the front of the request URL. The remainder of
the request URL is then appended to the alternate URL (alt-url).
The -replace option is especially useful when you move an entire file structure
intact from one host to another.
For example, you can use the following Region directive to redirect requests for all
objects under directory /info/stocks/* to the new location
http://quote.widgets.com/stocks as follows:
Region /info/stocks/* {
Redirect -replace /info/stocks
http://quote.widgets.com/stocks
}
In this example, any request for the object
/info/stocks/quote/dec.html
is redirected to the URL
http://quote.widgets.com/stocks/quote/dec.html
Enabling Automatic Directory Indexing
You can enable automatic indexing for server directories. Under automatic indexing, if
a request corresponds to a directory for which no index file is available, the server
automatically generates one.
To enable automatic indexing, you use the DirectoryIndex command in a Region
directive. For example, the following directive enables indexing for all directories on the
server:
Region * {
DirectoryIndex
}
The following example shows an index generated under automatic directory indexing:
NameLast ModifiedSize
-------------------------------------------------------
../26-Mar-9510:14
CVS/17-Mar-9513:44
a-very-long-file-name-test17-Mar-9512:OK
size-100000.html17-Mar-9512:1597K
subdir/17-Mar-9513:44
test.html17-Mar-9512:15OK
Automatic directory indexing is disabled by default; if no index file is available, the
server returns an error for any attempt to access a directory.