548 lines
34 KiB
HTML
548 lines
34 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_alias" />
|
|
<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_alias" />
|
|
<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_alias</title>
|
|
</head>
|
|
<body id="rzaiemod_alias"><a name="rzaiemod_alias"><!-- --></a>
|
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
|
<!--Java sync-link--><h1 class="topictitle1">Module mod_alias</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_alias provides mapping for different parts of the host filesystem
|
|
in the document tree and also for URL redirection. </p>
|
|
<p><strong>Directives</strong></p>
|
|
<ul><li><a href="#alias">Alias</a></li>
|
|
<li><a href="#aliasmatch">AliasMatch</a></li>
|
|
<li><a href="#mapmatch">MapMatch</a></li>
|
|
<li><a href="#redirect">Redirect</a></li>
|
|
<li><a href="#redirectmatch">RedirectMatch</a></li>
|
|
<li><a href="#redirectpermanent">RedirectPermanent</a></li>
|
|
<li><a href="#redirecttemp">RedirectTemp</a></li>
|
|
<li><a href="#scriptalias">ScriptAlias</a></li>
|
|
<li><a href="#scriptaliasmatch">ScriptAliasMatch</a></li>
|
|
</ul>
|
|
</div>
|
|
<div class="hr" id="alias"><a name="alias"><!-- --></a><h2 class="topictitle2">Alias</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_alias</td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Syntax">Syntax</a></strong>: Alias <em>url-path directory-filename</em> </td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Default">Default</a></strong>: none </td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Context">Context</a></strong>: <span id="alias__alias_context"><a name="alias__alias_context"><!-- --></a>server config, virtual
|
|
host </span></td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Override">Override</a></strong>: none </td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Origin">Origin</a></strong>: <span id="alias__alias_origin"><a name="alias__alias_origin"><!-- --></a>Apache </span></td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Example">Example</a></strong>: Alias /image /QIBM/UserData/pub/image</td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Example">Example</a></strong>: Alias /httpfile/ /QSYS.LIB/AS400LIB.LIB/HTML.FILE/ </td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p>This directive allows documents to be stored in the local filesystem other
|
|
than under the <a href="rzaiemod_core.htm#documentroot">DocumentRoot</a>.
|
|
URLs with a (%-decoded) path beginning with the value of the URL-path parameter
|
|
will be mapped to local files beginning with the value of directory-filename.
|
|
Alias also allows you to hide the file system path from users, enhancing both
|
|
security of your server and the ability to change the filesystem structure
|
|
or paths without impacting the end users. </p>
|
|
<dl class="block"><dt class="dlterm"><strong>Parameter One</strong>: <em>url-path </em></dt>
|
|
<dd><ul><li>The <em>url-path</em> paramter is any valid URL path. If you include a trailing
|
|
'/' in the URL path, then the server will require a trailing '/' in order
|
|
to expand the alias. That is, if you use <tt>'Alias /icons/ /www/images/iSeries/icons/'</tt> then
|
|
the URL <tt>'/icon'</tt> will not be aliased.</li>
|
|
</ul>
|
|
</dd>
|
|
</dl>
|
|
<dl class="block"><dt class="dlterm"><strong>Parameter Two</strong>: <em>directory-filename </em></dt>
|
|
<dd><ul><li>The <em>directory-filename</em> parameter is any valid directory/filename
|
|
combination on the system. </li>
|
|
</ul>
|
|
</dd>
|
|
</dl>
|
|
<div class="note"><span class="notetitle">Note:</span> You may need to specify additional <a href="rzaiemod_core.htm#directory"><Directory></a> containers that cover the destination of aliases. Aliasing
|
|
occurs before <Directory> containers are checked, so only the destination
|
|
of aliases are affected. <a href="rzaiemod_core.htm#location"><Location></a> containers
|
|
are run through once before aliases are performed, so they will apply. </div>
|
|
<p>See <a href="#scriptalias">ScriptAlias</a> for more information.</p>
|
|
</div>
|
|
</div>
|
|
<div class="hr" id="aliasmatch"><a name="aliasmatch"><!-- --></a><h2 class="topictitle2">AliasMatch</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_alias </td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Syntax">Syntax</a></strong>: AliasMatch <em>regex directory-filename</em> </td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Default">Default</a></strong>: none </td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Context">Context</a></strong>: <span id="aliasmatch__aliasmatch_context"><a name="aliasmatch__aliasmatch_context"><!-- --></a>server config,
|
|
virtual host </span></td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Override">Override</a></strong>: none </td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Origin">Origin</a></strong>: <span id="aliasmatch__aliasmatch_origin"><a name="aliasmatch__aliasmatch_origin"><!-- --></a>Apache</span></td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Example">Example</a></strong>: AliasMatch ^/icons(.*) /www/images/HTTP_Server/icons$1</td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Example">Example</a></strong>: AliasMatch ^/lib/docs(.*) /QSYS.LIB/DOCLIB.LIB/HTMLDOC.FILE/$1.MBR </td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p>This directive is equivalent to <a href="#alias">Alias</a>, but makes
|
|
use of standard regular expressions, instead of simple prefix matching. The
|
|
supplied regular expression is matched against the URL, and if it matches,
|
|
the server will substitute any parenthesized matches into the given string
|
|
and use it as a filename. </p>
|
|
<dl class="block"><dt class="dlterm"><strong>Parameter One</strong>: <em>regex </em></dt>
|
|
<dd><ul><li>The <em>regex</em> parameter is a regular expression that is matched against
|
|
the URL. Subexpressions are grouped within parentheses. Then parenthetically
|
|
enclosed regular expressions will be substituted in a subsequent $n statement. </li>
|
|
</ul>
|
|
</dd>
|
|
</dl>
|
|
<dl class="block"><dt class="dlterm"><strong>Parameter Two</strong>: <em>directory-filename </em></dt>
|
|
<dd><ul><li>The <em>directory-filename</em> parameter is any valid directory/filename
|
|
that is supported on the iSeries™. If there is a <em>$</em> symbol (followed
|
|
by a digit) that is not a substitution variable in the <em>directory-filename</em> parameter,
|
|
or there is an <em>&</em> symbol in the <em>directory-filename</em> parameter
|
|
that is part of the directory or filename, the symbol must be escaped (\).</li>
|
|
</ul>
|
|
</dd>
|
|
</dl>
|
|
<p>If the directory-filename is /usr/local/apache/icons&gifs/ the <em>&</em> would
|
|
need to be escaped as follows on the AliasMatch directive:</p>
|
|
<pre class="block">AliasMatch ^/icons(.*) /usr/local/apache/icons\gifs/</pre>
|
|
<p>If the directory-filename is /usr/local/apache/icon$1/ the <em>$</em> would
|
|
need to be escaped as follows on the AliasMatch directive:</p>
|
|
<pre class="block">AliasMatch ^/icons(.*) /usr/local/apache/icon\$1/</pre>
|
|
<p>See <a href="rzaieregexpnot.htm">Regular expression notation for HTTP Server</a> for more information.</p>
|
|
</div>
|
|
</div>
|
|
<div class="hr" id="mapmatch"><a name="mapmatch"><!-- --></a><h2 class="topictitle2">MapMatch</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_alias </td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Syntax">Syntax</a></strong>: MapMatch <em>regex URI </em></td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Default">Default</a></strong>: none </td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Context">Context</a></strong>: <span id="mapmatch__mapmatch_context"><a name="mapmatch__mapmatch_context"><!-- --></a>server config,
|
|
virtual host</span></td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Override">Override</a></strong>: none </td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Origin">Origin</a></strong>: <span id="mapmatch__mapmatch_origin"><a name="mapmatch__mapmatch_origin"><!-- --></a>Apache</span></td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Example">Example</a></strong>: MapMatch ^/icons(.*) /www/apache/icons\&gifs/ </td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p>The MapMatch directive uses standard regular expressions to change a URI
|
|
to a different URI. The supplied regular expression is matched against the
|
|
URL, and if it matches, the server will substitute any parenthesized matches
|
|
into the given string and use it as the URI. This is not a terminating directive.
|
|
The server will use the new URI as input to Alias, Redirect or other MapMatch
|
|
directives. </p>
|
|
<dl class="block"><dt class="dlterm"><strong>Parameter One</strong>: <em>regex </em></dt>
|
|
<dd><ul><li>The <em>regex</em> paramter is a regular expression that is matched against
|
|
the URL. Subexpressions are grouped within parentheses. The parenthetically
|
|
enclosed regular expressions will be substituted in a subsequent $n statement.</li>
|
|
</ul>
|
|
</dd>
|
|
</dl>
|
|
<dl class="block"><dt class="dlterm"><strong>Parameter Two</strong>: <em>URI </em></dt>
|
|
<dd><ul><li>The <em>URI</em> paramater is any valid URI that is supported on the iSeries.
|
|
If there is a <em>$</em> symbol (followed by a digit) that is not a substitution
|
|
variable in the URI parameter, or there is an <em>&</em> symbol in the URI
|
|
parameter that is part of the URI, the symbol must be escaped (\). </li>
|
|
</ul>
|
|
</dd>
|
|
</dl>
|
|
<p>If the target URI is /www/apache/icons\&gifs/ the & would need
|
|
to be escaped as follows on the MapMatch directive: </p>
|
|
<pre class="block">MapMatch ^/icons(.*) /www/apache/icons\&gifs/</pre>
|
|
<p>If the target URI is /www/apache/icon$1/ the $ would need to be escaped
|
|
as follows on the MapMatch directive: </p>
|
|
<pre class="block">MapMatch ^/icons(.*) /www/apache/icon\$1/ </pre>
|
|
<p>See <a href="rzaieregexpnot.htm">Regular expression notation for HTTP Server</a> for more information.</p>
|
|
</div>
|
|
</div>
|
|
<div class="hr" id="redirect"><a name="redirect"><!-- --></a><h2 class="topictitle2">Redirect</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_alias </td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Syntax">Syntax</a></strong>: Redirect <em>[status] url-path url </em></td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Default">Default</a></strong>: none </td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Context">Context</a></strong>: <span id="redirect__redirect_context"><a name="redirect__redirect_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>: FileInfo </td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Origin">Origin</a></strong>: <span id="redirect__redirect_origin"><a name="redirect__redirect_origin"><!-- --></a>Apache </span></td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Example">Example</a></strong>: Redirect /service http://foo2.bar.com/service </td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p>The Redirect directive maps an old URL into a new one. The new URL is returned
|
|
to the client, who then attempts to access the page with the new address.
|
|
URL-path is a (%-decoded) path; any requests for documents beginning with
|
|
this path will be returned with a redirect error to a new (%-encoded) URL
|
|
beginning with <em>url</em>. </p>
|
|
<dl class="block"><dt class="dlterm"><strong>Parameter One</strong>: <em>status </em></dt>
|
|
<dd><ul><li>The <em>status</em> parameter is used to return the below HTTP status codes:
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" frame="border" border="1" rules="all"><thead align="left"><tr><th valign="top" id="d0e502">Status</th>
|
|
<th valign="top" id="d0e504">Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr><td valign="top" headers="d0e502 ">permanent </td>
|
|
<td valign="top" headers="d0e504 ">Returns a permanent redirect status (301) indicating
|
|
that the resource has moved permanently. </td>
|
|
</tr>
|
|
<tr><td valign="top" headers="d0e502 ">temp </td>
|
|
<td valign="top" headers="d0e504 ">Returns a temporary redirect status (302). This is the
|
|
default. </td>
|
|
</tr>
|
|
<tr><td valign="top" headers="d0e502 ">seeother </td>
|
|
<td valign="top" headers="d0e504 ">Returns a "See Other" status (303) indicating that the
|
|
resource has been replaced. </td>
|
|
</tr>
|
|
<tr><td valign="top" headers="d0e502 ">gone </td>
|
|
<td valign="top" headers="d0e504 ">Returns a "Gone" status (410) indicating that the resource
|
|
has been permanently removed. When this status is used the <em>url</em> argument
|
|
should be omitted. </td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p>If no status argument is given, the redirect will be "temporary"
|
|
(HTTP status 302). This indicates to the client that the resource has moved
|
|
temporarily. Other status codes can be returned by giving the numeric status
|
|
code as the value of status. If the status is between 300 and 399, the url
|
|
argument must be present, otherwise it must be omitted. Regardless, any HTTP
|
|
status given must be known to HTTP Server. </p>
|
|
</li>
|
|
</ul>
|
|
</dd>
|
|
</dl>
|
|
<dl class="block"><dt class="dlterm"><strong>Parameter Two</strong>: <em>url-path </em></dt>
|
|
<dd><ul><li>If the url-path has a trailing slash ('/'), the <em>url</em> should also
|
|
have a trailing slash. If the <em>url-path</em> does not contain a trailing
|
|
slash, the <em>url</em> should not either. Double check the designated <em>url-path</em> and
|
|
the <em>url</em>, or a double-slash ('//') may appear in the resulting URL.
|
|
The <em>url-path</em> must be an absolute path, not a relative path, even when
|
|
used with .htaccess files or inside of <a href="rzaiemod_core.htm#directory"><Directory></a> containers. The <em>url-path</em> must match the requested
|
|
resource exactly or be a proper ancestor of it. </li>
|
|
</ul>
|
|
</dd>
|
|
</dl>
|
|
<dl class="block"><dt class="dlterm"><strong>Parameter Three</strong>: <em>url</em></dt>
|
|
<dd><ul><li>The <em>url</em> parameter should be a complete URL string, including the
|
|
scheme ('http://...') and the 'server:host' portion. When the status parameter
|
|
is "gone", the url argument should be omitted. </li>
|
|
</ul>
|
|
</dd>
|
|
</dl>
|
|
<div class="note"><span class="notetitle">Note:</span> Redirect directives take precedence over Alias and ScriptAlias directives,
|
|
regardless of their order in the configuration file.</div>
|
|
</div>
|
|
</div>
|
|
<div class="hr" id="redirectmatch"><a name="redirectmatch"><!-- --></a><h2 class="topictitle2">RedirectMatch</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_alias </td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Syntax">Syntax</a></strong>: RedirectMatch <em>[status] regex url </em></td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Default">Default</a></strong>: none </td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Context">Context</a></strong>: <span id="redirectmatch__redirectmatch_context"><a name="redirectmatch__redirectmatch_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>: FileInfo </td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Origin">Origin</a></strong>: <span id="redirectmatch__redirectmatch_origin"><a name="redirectmatch__redirectmatch_origin"><!-- --></a>Apache</span></td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Example">Example</a></strong>: RedirectMatch (.*)\.gif$ http://www.anotherserver.com$1.jpg </td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p>This directive is equivalent to <a href="#redirect">Redirect</a>, but makes
|
|
use of standard regular expressions, instead of simple prefix matching. The
|
|
supplied regular expression is matched against the URL, and if it matches,
|
|
the server will substitute any parenthesized matches into the given string
|
|
and use it as a filename. </p>
|
|
<dl class="block"><dt class="dlterm"><strong>Parameter One</strong>: <em>status </em></dt>
|
|
<dd><ul><li>The <em>status</em> parameter is used to return the below HTTP status codes:
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" frame="border" border="1" rules="all"><thead align="left"><tr><th valign="top" id="d0e668">Status</th>
|
|
<th valign="top" id="d0e670">Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr><td valign="top" headers="d0e668 ">permanent </td>
|
|
<td valign="top" headers="d0e670 ">Returns a permanent redirect status (301) indicating
|
|
that the resource has moved permanently. </td>
|
|
</tr>
|
|
<tr><td valign="top" headers="d0e668 ">temp </td>
|
|
<td valign="top" headers="d0e670 ">Returns a temporary redirect status (302). This is the
|
|
default. </td>
|
|
</tr>
|
|
<tr><td valign="top" headers="d0e668 ">seeother </td>
|
|
<td valign="top" headers="d0e670 ">Returns a "See Other" status (303) indicating that the
|
|
resource has been replaced. </td>
|
|
</tr>
|
|
<tr><td valign="top" headers="d0e668 ">gone </td>
|
|
<td valign="top" headers="d0e670 ">Returns a "Gone" status (410) indicating that the resource
|
|
has been permanently removed. When this status is used the <em>url</em> argument
|
|
should be omitted. </td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p>If no status argument is given, the redirect will be "temporary"
|
|
(HTTP status 302). This indicates to the client that the resource has moved
|
|
temporarily. Other status codes can be returned by giving the numeric status
|
|
code as the value of status. If the status is between 300 and 399, the url
|
|
argument must be present, otherwise it must be omitted. Regardless, any HTTP
|
|
status given must be known to HTTP Server. </p>
|
|
</li>
|
|
</ul>
|
|
</dd>
|
|
</dl>
|
|
<dl class="block"><dt class="dlterm"><strong>Parameter Two</strong>: <em>regex </em></dt>
|
|
<dd><ul><li>The <em>regex</em> parameter is aregular expression that is matched against
|
|
the URL. Subexpressions are grouped within parentheses. Then, parenthetically
|
|
enclosed regular expressions will be substituted in a subsequent $n statement. </li>
|
|
</ul>
|
|
</dd>
|
|
</dl>
|
|
<dl class="block"><dt class="dlterm"><strong>Parameter Three</strong>: <em>url </em></dt>
|
|
<dd><ul><li>The <em>url</em> parameter should be a complete URL string, including the
|
|
scheme ('http://...') and the 'server:port' portion. If there is a <em>$</em> symbol
|
|
(followed by a digit) that is not a substitution variable in the url parameter,
|
|
or there is a <em>&</em> symbol in the url parameter that is part of the
|
|
URL, the symbol must be escaped (\). </li>
|
|
</ul>
|
|
</dd>
|
|
</dl>
|
|
<p>If the URL to redirect to is http://www.anotherserver.com/cgi-bin/welcome.cgi?parm1=login&parm2=mainlist
|
|
the & would need to be escaped as follows on the RedirectMatch directive:</p>
|
|
<pre class="block">RedirectMatch(.*) http://www.anotherserver.com/cgi-bin/welcome.cgi?parm1=login\&parm2=mainlist</pre>
|
|
<p>If the URL to redirect to is http://www.anotherserver.com/htdocs/welcome$2login.html
|
|
the $2 would need to be escaped as follows on the RedirectMatch directive:</p>
|
|
<pre class="block">RedirectMatch (.*) http://www.anotherserver.com/htdocs/welcome\$2login.html</pre>
|
|
<p>See <a href="rzaieregexpnot.htm">Regular expression notation for HTTP Server</a> for more information.</p>
|
|
</div>
|
|
</div>
|
|
<div class="hr" id="redirectpermanent"><a name="redirectpermanent"><!-- --></a><h2 class="topictitle2">RedirectPermanent</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_alias </td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Syntax">Syntax</a></strong>: RedirectPermanent <em>url-path url</em> </td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Default">Default</a></strong>: none </td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Context">Context</a></strong>: <span id="redirectpermanent__redirectpermanent_context"><a name="redirectpermanent__redirectpermanent_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>: FileInfo </td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Origin">Origin</a></strong>: <span id="redirectpermanent__redirectpermanent_origin"><a name="redirectpermanent__redirectpermanent_origin"><!-- --></a>Apache </span></td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Example">Example</a></strong>: RedirectPermanent /payroll http://payroll.server.com/payroll </td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p>The RedirectPermanent directive notifies the client that the Redirect is
|
|
permanent (status 301). This is the exact equivalent to Redirect permanent. </p>
|
|
<dl class="block"><dt class="dlterm"><strong>Parameter One</strong>: <em>url-path </em></dt>
|
|
<dd><ul><li>The <em>url-path</em> parameter is any valid URL path. If you include a
|
|
trailing '/' in the URL path, then the server will require a trailing '/'
|
|
in order to expand the alias. That is, if you use <tt>'Alias /icons/ /www/images/iSeries/icons/'</tt> then
|
|
the URL <tt>'/icon'</tt> will not be aliased. </li>
|
|
</ul>
|
|
</dd>
|
|
</dl>
|
|
<dl class="block"><dt class="dlterm"><strong>Parameter Two</strong>: <em>url </em></dt>
|
|
<dd><ul><li>The <em>url</em> parameter should be a complete URL string, including the
|
|
scheme ('http://...') and the 'server:host' portion. When the status parameter
|
|
is "gone", the url argument should be omitted. </li>
|
|
</ul>
|
|
</dd>
|
|
</dl>
|
|
<p>See <a href="rzaieregexpnot.htm">Regular expression notation for HTTP Server</a> for more information.</p>
|
|
</div>
|
|
</div>
|
|
<div class="hr" id="redirecttemp"><a name="redirecttemp"><!-- --></a><h2 class="topictitle2">RedirectTemp</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_alias </td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Syntax">Syntax</a></strong>: RedirectTemp <em>url-path url</em> </td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Default">Default</a></strong>: none </td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Context">Context</a></strong>: <span id="redirecttemp__redirecttemp_context"><a name="redirecttemp__redirecttemp_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>: FileInfo </td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Origin">Origin</a></strong>: <span id="redirecttemp__redirecttemp_origin"><a name="redirecttemp__redirecttemp_origin"><!-- --></a>Apache </span></td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Example">Example</a></strong>: RedirectTemp /service http://foo2.bar.com/service </td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p>The RedirectTemp directive notifies the client that the Redirect is only
|
|
temporary (status 302). This is the exact equivalent to Redirect temp. </p>
|
|
<dl class="block"><dt class="dlterm"><strong>Parameter One</strong>: <em>url-path </em></dt>
|
|
<dd><ul><li>The <em>url-path</em> parameter is any valid URL path. If you include a
|
|
trailing '/' in the URL path, then the server will require a trailing '/'
|
|
in order to expand the alias. That is, if you use <em>'Alias /icons/ /www/images/iSeries/icons/'</em> then
|
|
the URL <em>'/icon'</em> will not be aliased. </li>
|
|
</ul>
|
|
</dd>
|
|
</dl>
|
|
<dl class="block"><dt class="dlterm"><strong>Parameter Two</strong>: <em>url </em></dt>
|
|
<dd><ul><li>The <em>url</em> parameter should be a complete URL string, including the
|
|
scheme ('http://...') and the 'server:host' portion. When the status parameter
|
|
is "gone", the <em>url</em> argument should be omitted. </li>
|
|
</ul>
|
|
</dd>
|
|
</dl>
|
|
<p>See <a href="rzaieregexpnot.htm">Regular expression notation for HTTP Server</a> for more information.</p>
|
|
</div>
|
|
</div>
|
|
<div class="hr" id="scriptalias"><a name="scriptalias"><!-- --></a><h2 class="topictitle2">ScriptAlias</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_alias </td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Syntax">Syntax</a></strong>: ScriptAlias <em>url-path directory-filename</em> </td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Default">Default</a></strong>: none </td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Context">Context</a></strong>: <span id="scriptalias__scriptalias_context"><a name="scriptalias__scriptalias_context"><!-- --></a>server config,
|
|
virtual host </span></td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Override">Override</a></strong>: none </td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Origin">Origin</a></strong>: <span id="scriptalias__scriptalias_origin"><a name="scriptalias__scriptalias_origin"><!-- --></a>Apache</span></td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Example">Example</a></strong>: ScriptAlias /cgi-bin/ /web/cgi-bin/ </td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Example">Example</a></strong>: ScriptAlias /cgi-bin/ /QSYS.LIB/QSYSCGI.LIB/ </td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p>The ScriptAlias directive has the same behavior as the <a href="#alias">Alias</a> directive,
|
|
except that in addition it marks the target directory as containing CGI scripts,
|
|
and then executes the CGI program. URLs with a (%-decoded) path beginning
|
|
with url-path will be mapped to scripts beginning with directory-filename.
|
|
Additional <a href="rzaiemod_core.htm#directory"><Directory></a>
|
|
containers that cover the destination of the ScriptAlias may need to be specified.
|
|
Aliasing occurs before <Directory> containers are checked, so only the
|
|
destination of Aliases are affected.</p>
|
|
<dl class="block"><dt class="dlterm"><strong>Parameter One</strong>: <em> url-path </em></dt>
|
|
<dd><ul><li>The <em>url-path</em> parameter is any valid url-path. It must end with
|
|
a slash ('/') character so that any files in the directory will be routed. </li>
|
|
</ul>
|
|
</dd>
|
|
</dl>
|
|
<dl class="block"><dt class="dlterm"><strong>Parameter Two</strong>: <em>directory-filename </em></dt>
|
|
<dd><ul><li>The <em>directory-filename</em> parameter is any valid directory/filename
|
|
on the iSeries. </li>
|
|
</ul>
|
|
</dd>
|
|
</dl>
|
|
<div class="note"><span class="notetitle">Note:</span> If the URL ends in a slash ("/") character, the ScriptAlias must also
|
|
end in a slash character.</div>
|
|
</div>
|
|
</div>
|
|
<div class="hr" id="scriptaliasmatch"><a name="scriptaliasmatch"><!-- --></a><h2 class="topictitle2">ScriptAliasMatch</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_alias </td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Syntax">Syntax</a></strong>: ScriptAliasMatch<em> regex directory-filename</em> </td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Default">Default</a></strong>: none </td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Context">Context</a></strong>: <span id="scriptaliasmatch__scriptaliasmatch_context"><a name="scriptaliasmatch__scriptaliasmatch_context"><!-- --></a>server
|
|
config, virtual host </span></td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Override">Override</a></strong>: none </td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Origin">Origin</a></strong>: <span id="scriptaliasmatch__scriptaliasmatch_origin"><a name="scriptaliasmatch__scriptaliasmatch_origin"><!-- --></a>Apache </span></td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Example">Example</a></strong>: ScriptAliasMatch ^/cgi-bin/(.*)\.cgi /QSYS.LIB/QSYSCGI.LIB/$1.PGM </td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p>This directive is equivalent to <a href="#scriptalias">ScriptAlias</a>, but
|
|
makes use of standard regular expressions, instead of simple prefix matching.
|
|
The supplied regular expression is matched against the URL, and if it matches,
|
|
the server will substitute any parenthesized matches into the given string
|
|
and use it as a filename. </p>
|
|
<dl class="block"><dt class="dlterm"><strong>Parameter One</strong>: <em>regex </em></dt>
|
|
<dd><ul><li>The <em>regex</em> parameter is a regular expression that is matched against
|
|
the URL. Subexpressions are grouped within parentheses. Then, parenthetically
|
|
enclosed regular expressions will be substituted in a subsequent $n statement. </li>
|
|
</ul>
|
|
</dd>
|
|
</dl>
|
|
<dl class="block"><dt class="dlterm"><strong>Parameter Two</strong>: <em>directory-filename </em></dt>
|
|
<dd><ul><li>This is any valid directory/filename that is supported on the iSeries.
|
|
If there is a <em>$</em> symbol (followed by a digit) that is not a substitution
|
|
variable in the directory-filename parameter, or there is a <em>&</em> symbol
|
|
in the directory-filename parameter that is part of the directory or filename,
|
|
the symbol must be escaped (\).</li>
|
|
</ul>
|
|
</dd>
|
|
</dl>
|
|
<p>If the directory-filename is /usr/local/apache/cgi-bin&sym/$1.pgm,
|
|
where the $1 is a substitution variable, the & would need to be escaped
|
|
as follows on the ScriptAliasMatch directive:</p>
|
|
<pre class="block">ScriptAliasMatch ^/cgi-bin/(.*)\.cgi /usr/local/apache/cgi-bins\&sym/$1.pgm</pre>
|
|
<p>If the directory-filename is /usr/local/apache/cgi-bin$2sym/ $1.pgm, where
|
|
the $1 is a substitution variable, the $2 would need to be escaped as follows
|
|
on the ScriptAliasMatch directive:</p>
|
|
<pre class="block">ScriptAliasMatch ^/cgi-bin/(.*)\.cgi /usr/local/apache/cgi-bin\$2sym/$1.pgm</pre>
|
|
</div>
|
|
</div>
|
|
|
|
</body>
|
|
</html> |