ibm-information-center/dist/eclipse/plugins/i5OS.ic.rzaie_5.4.0.1/rzaiemod_dir.htm

146 lines
9.6 KiB
HTML

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en-us" xml:lang="en-us">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="security" content="public" />
<meta name="Robots" content="index,follow" />
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
<meta name="DC.Type" content="topic" />
<meta name="DC.Title" content="Module mod_dir" />
<meta name="copyright" content="(C) Copyright IBM Corporation 2002,2006" />
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 2002,2006" />
<meta name="DC.Format" content="XHTML" />
<meta name="DC.Identifier" content="rzaiemod_dir" />
<meta name="DC.Language" content="en-us" />
<!-- All rights reserved. Licensed Materials Property of IBM -->
<!-- US Government Users Restricted Rights -->
<!-- Use, duplication or disclosure restricted by -->
<!-- GSA ADP Schedule Contract with IBM Corp. -->
<link rel="stylesheet" type="text/css" href="./ibmdita.css" />
<link rel="stylesheet" type="text/css" href="./ic.css" />
<title>Module mod_dir</title>
</head>
<body id="rzaiemod_dir"><a name="rzaiemod_dir"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<!--Java sync-link--><h1 class="topictitle1">Module mod_dir</h1>
<div><div class="important"><span class="importanttitle">Important:</span> Information
for this topic supports the latest PTF levels for HTTP Server for i5/OS .
It is recommended that you install the latest PTFs to upgrade to the latest
level of the HTTP Server for i5/OS. Some of the topics documented here are
not available prior to this update. See <a href="http://www-03.ibm.com/servers/eserver/iseries/software/http/services/service.html" target="_blank">http://www.ibm.com/servers/eserver/iseries/software/http/services/service.htm</a> <img src="www.gif" alt="Link outside Information Center" /> for more information. </div>
<p><strong>Summary</strong></p>
<p>The module mod_dir provides "trailing slash" redirects and serving directory
index files. The index of a directory can come from one of two sources: </p>
<ul><li>A file written by the user, typically called index.html. The name of this
file is set by the DirectoryIndex directive . This directive is controlled
by module mod_dir.</li>
<li>A list generated by the server through mod_auto_index. See <a href="rzaiemod_auto_index.htm">mod_auto_index</a> for
more information.</li>
</ul>
<p>The two functions are separated so you can completely remove (or replace)
automatic index generation.</p>
<p>By default, a trailing slash ('/') redirect is issued when the server receives
a request for a URL http://servername/QIBM/dirname where dirname is a directory.
Directories require a trailing slash, so mod_dir issues a redirect to http://servername/QIBM/dirname/.</p>
<p>The AlwaysDirectoryIndex directive controls how the server will respond
to directory requests.</p>
<p><strong>Directives</strong></p>
<ul><li><a href="#alwaysdirectoryindex">AlwaysDirectoryIndex</a></li>
<li><a href="#directoryindex">DirectoryIndex</a></li>
</ul>
</div>
<div class="hr" id="alwaysdirectoryindex"><a name="alwaysdirectoryindex"><!-- --></a><h2 class="topictitle2">AlwaysDirectoryIndex</h2>
<div>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" frame="void" border="0" rules="none"><tbody><tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Module">Module</a></strong>: mod_dir </td>
</tr>
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Syntax">Syntax</a></strong>: AlwaysDirectoryIndex <em>on | off </em></td>
</tr>
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Default">Default</a></strong>: Always DirectoryIndex on </td>
</tr>
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Context">Context</a></strong>: <span id="alwaysdirectoryindex__alwaysdirectoryindex_context"><a name="alwaysdirectoryindex__alwaysdirectoryindex_context"><!-- --></a>server
config, virtual host, directory, .htaccess </span></td>
</tr>
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Override">Override</a></strong>: Indexes </td>
</tr>
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Origin">Origin</a></strong>: <span id="alwaysdirectoryindex__alwaysdirectoryindex_origin"><a name="alwaysdirectoryindex__alwaysdirectoryindex_origin"><!-- --></a>iSeries™ </span></td>
</tr>
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Example">Example</a></strong>: AlwaysDirectoryIndex off </td>
</tr>
</tbody>
</table>
</div>
<p>The AlwaysDirectoryIndex directive specifies if you want the server to
always handle directory requests by first searching the directory for an index
(Welcome) file. </p>
<dl class="block"><dt class="dlterm"><strong>Parameter</strong>: <em>on | off </em></dt>
<dd><ul><li>The <em>on</em> parameter sets the server to always search the directory
for an index file, regardless of whether a trailing slash ('/') exists in
the URL. The DirectoryIndex directive specifies the names of the files that
the server recognizes as index (Welcome) files. </li>
<li>The <em>off</em> parameter sets the server to first check the last character
of requests that refer to iSeries files, QDLS folders, or integrated file
system directories for the slash ('/') character. If the directory request
ends with a slash, the server searches the directory for an index file. If
the directory request does not end with a slash, the server attempts to return
a directory listing (rather then doing a "trailing slash" redirect). </li>
</ul>
</dd>
</dl>
<p>If the server does not find an index file, or AlwaysWelcome is set to off
and the directory request does not end in a slash, <a href="rzaiemod_core.htm#options">Options</a> controls whether or not the server responds to the request
with a directory listing. </p>
</div>
</div>
<div class="hr" id="directoryindex"><a name="directoryindex"><!-- --></a><h2 class="topictitle2">DirectoryIndex</h2>
<div>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" frame="void" border="0" rules="none"><tbody><tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Module">Module</a></strong>: mod_dir </td>
</tr>
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Syntax">Syntax</a></strong>: DirectoryIndex <em>local-url [local-URL ...] </em></td>
</tr>
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Default">Default</a></strong>: DirectoryIndex index.html </td>
</tr>
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Context">Context</a></strong>: <span id="directoryindex__directoryindex_context"><a name="directoryindex__directoryindex_context"><!-- --></a>server
config, virtual host, directory, .htaccess </span></td>
</tr>
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Override">Override</a></strong>: Indexes </td>
</tr>
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Origin">Origin</a></strong>: <span id="directoryindex__directoryindex_origin"><a name="directoryindex__directoryindex_origin"><!-- --></a>Apache </span></td>
</tr>
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Example">Example</a></strong>: DirectoryIndex bob.html index.html </td>
</tr>
</tbody>
</table>
</div>
<p>The DirectoryIndex directive sets the list of resources to look for, when
the client requests an index of the directory by specifying a / at the end
of the a directory name. Local-URL is the (%-encoded) URL of a document on
the server relative to the requested directory; it is usually the name of
a file in the directory. Several URLs may be given, in which case the server
will return the first one that it finds. If none of the resources exist and
the Indexes option is set, the server will generate its own listing of the
directory. </p>
<dl class="block"><dt class="dlterm"><strong>Parameter</strong>: <em>local-url </em></dt>
<dd><ul><li>The <em>local-url</em> parameter is the (%-encoded) URL of a document on
the server relative to the requested directory; it is usually the name of
a file in the directory. For example:<pre>DirectoryIndex index.html</pre>
</li>
</ul>
</dd>
</dl>
<p>A request for<tt> http://myserver/docs</tt>/ would return <tt>http://myserver/docs/index.htm</tt>l
if it exists, or it would list the directory if it did not exist. </p>
<p>The documents do not need to be relative to the directory. For example: </p>
<pre class="block">DirectoryIndex index.html index.txt /cgi-bin/index.pl</pre>
<p>This would cause the CGI script /cgi-bin/index.pl to be run if neither
index.html or index.txt existed in a directory. This same idea will also work
for QSYS.LIB files. For example, if the directory index is stored in /QSYS.LIB/MYLIB.LIB/MYFILE.FILE/INDEX.MBR,
you would need to specify <strong>DirectoryIndex Index.mbr</strong>.</p>
<p>This directive may be configured multiple times in a container. The directives
are processed from the first to the last occurrence. </p>
</div>
</div>
</body>
</html>