files.</p>
</div><div id="quickview"><h3 class="directives">Directives</h3><ul id="toc"><li><img alt="" src="../images/down.gif" /> <a href="#action">Action</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#script">Script</a></li>
-</ul></div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div><div class="directive-section"><h2><a name="Action" id="Action">Action</a> <a name="action" id="action">Directive</a></h2><table class="directive"><tr><th><a href="directive-dict.html#Description">Description:
+</ul><h3>See also</h3><ul class="seealso"><li><code class="module"><a href="../mod/mod_cgi.html">mod_cgi</a></code></li><li><a href="../howto/cgi.html">Dynamic Content with CGI</a></li><li><a href="../handler.html">Apache's Handler Use</a></li></ul></div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div><div class="directive-section"><h2><a name="Action" id="Action">Action</a> <a name="action" id="action">Directive</a></h2><table class="directive"><tr><th><a href="directive-dict.html#Description">Description:
</a></th><td>Activates a CGI script for a particular handler or
content-type</td></tr><tr><th><a href="directive-dict.html#Syntax">Syntax:
- </a></th><td><code>Action <em>action-type cgi-script</em></code></td></tr><tr><th><a href="directive-dict.html#Context">Context:
+ </a></th><td><code>Action <var>action-type</var> <var>cgi-script</var></code></td></tr><tr><th><a href="directive-dict.html#Context">Context:
</a></th><td>server config, virtual host, directory, .htaccess</td></tr><tr><th><a href="directive-dict.html#Override">Override:
</a></th><td>FileInfo</td></tr><tr><th><a href="directive-dict.html#Status">Status:
</a></th><td>Base</td></tr><tr><th><a href="directive-dict.html#Module">Module:
</a></th><td>mod_actions</td></tr></table>
<p>This directive adds an action, which will activate
- <em>cgi-script</em> when <em>action-type</em> is triggered by the
- request. The <em>cgi-script</em> is the URL-path to a resource
+ <var>cgi-script</var> when <var>action-type</var> is triggered by the
+ request. The <var>cgi-script</var> is the URL-path to a resource
that has been designated as a CGI script using <code class="directive"><a href="../mod/mod_alias.html#scriptalias">ScriptAlias</a></code> or <code class="directive"><a href="../mod/mod_mime.html#addhandler">AddHandler</a></code>. The
- <em>action-type</em> can be either a <a href="../handler.html">handler</a> or a MIME content type. It
+ <var>action-type</var> can be either a <a href="../handler.html">handler</a> or a MIME content type. It
sends the URL and file path of the requested document using the
standard CGI PATH_INFO and PATH_TRANSLATED environment
variables.</p>
-<div class="example"><h3>Examples</h3><p><code>
-
-
- # Requests for files of a particular type:<br />
- Action image/gif /cgi-bin/images.cgi<br />
-<br />
- # Files of a particular file extension<br />
- AddHandler my-file-type .xyz<br />
- Action my-file-type /cgi-bin/program.cgi<br />
-</code></p></div>
+ <div class="example"><h3>Examples</h3><p><code>
+ # Requests for files of a particular type:<br />
+ Action image/gif /cgi-bin/images.cgi<br />
+ <br />
+ # Files of a particular file extension<br />
+ AddHandler my-file-type .xyz<br />
+ Action my-file-type /cgi-bin/program.cgi<br />
+ </code></p></div>
<p>In the first example, requests for files with a MIME content
type of <code>image/gif</code> will instead be handled by the
<h3>See also</h3><ul><li><code class="directive"><a href="../mod/mod_mime.html#addhandler">AddHandler</a></code></li></ul></div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div><div class="directive-section"><h2><a name="Script" id="Script">Script</a> <a name="script" id="script">Directive</a></h2><table class="directive"><tr><th><a href="directive-dict.html#Description">Description:
</a></th><td>Activates a CGI script for a particular request
method.</td></tr><tr><th><a href="directive-dict.html#Syntax">Syntax:
- </a></th><td><code> Script <em>method cgi-script</em></code></td></tr><tr><th><a href="directive-dict.html#Context">Context:
+ </a></th><td><code> Script <var>method cgi-script</var></code></td></tr><tr><th><a href="directive-dict.html#Context">Context:
</a></th><td>server config, virtual host, directory</td></tr><tr><th><a href="directive-dict.html#Status">Status:
</a></th><td>Base</td></tr><tr><th><a href="directive-dict.html#Module">Module:
</a></th><td>mod_actions</td></tr></table>
<p>This directive adds an action, which will activate
- <em>cgi-script</em> when a file is requested using the method of
- <em>method</em>. The <em>cgi-script</em> is the URL-path to a
+ <var>cgi-script</var> when a file is requested using the method of
+ <var>method</var>. The <var>cgi-script</var> is the URL-path to a
resource that has been designated as a CGI script using <code class="directive"><a href="../mod/mod_alias.html#scriptaliase">ScriptAliase</a></code> or <code class="directive"><a href="../mod/mod_mime.html#addhandler">AddHandler</a></code>. The URL and
file path of the requested document is sent using the standard CGI
PATH_INFO and PATH_TRANSLATED environment variables.</p>
-<div class="note">
+ <div class="note">
Any arbitrary method name may be used. <strong>Method names are
- case-sensitive</strong>, so <code>Script PUT</code> and
- <code>Script put</code> have two entirely different
+ case-sensitive</strong>, so <code>Script PUT</code> and
+ <code>Script put</code> have two entirely different
effects.
-</div>
+ </div>
<p>Note that the Script command defines default actions only.
If a CGI script is called, or some other resource that is
(<em>e.g.</em>, foo.html?hi). Otherwise, the request will
proceed normally.</p>
-<div class="example"><h3>Examples</h3><p><code>
-
- # For <ISINDEX>-style searching<br />
- Script GET /cgi-bin/search<br />
- # A CGI PUT handler<br />
- Script PUT /~bob/put.cgi<br />
-</code></p></div>
+ <div class="example"><h3>Examples</h3><p><code>
+ # For <ISINDEX>-style searching<br />
+ Script GET /cgi-bin/search<br />
+ <br />
+ # A CGI PUT handler<br />
+ Script PUT /~bob/put.cgi<br />
+ </code></p></div>
</div></div><div id="footer"><p class="apache">Maintained by the <a href="http://httpd.apache.org/docs-project/">Apache HTTP Server Documentation Project</a></p><p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p></div></body></html>
\ No newline at end of file
files.</p>
</summary>
-<directivesynopsis>
+<seealso><module>mod_cgi</module></seealso>
+<seealso><a href="../howto/cgi.html">Dynamic Content with CGI</a></seealso>
+<seealso><a href="../handler.html">Apache's Handler Use</a></seealso>
+<directivesynopsis>
<name>Action</name>
-
<description>Activates a CGI script for a particular handler or
content-type</description>
-
-<syntax>Action <em>action-type cgi-script</em></syntax>
+<syntax>Action <var>action-type</var> <var>cgi-script</var></syntax>
<contextlist>
<context>server config</context><context>virtual host</context>
<context>directory</context><context>.htaccess</context>
<usage>
<p>This directive adds an action, which will activate
- <em>cgi-script</em> when <em>action-type</em> is triggered by the
- request. The <em>cgi-script</em> is the URL-path to a resource
+ <var>cgi-script</var> when <var>action-type</var> is triggered by the
+ request. The <var>cgi-script</var> is the URL-path to a resource
that has been designated as a CGI script using <directive
module="mod_alias">ScriptAlias</directive> or <directive
module="mod_mime">AddHandler</directive>. The
- <em>action-type</em> can be either a <a
+ <var>action-type</var> can be either a <a
href="../handler.html">handler</a> or a MIME content type. It
sends the URL and file path of the requested document using the
standard CGI PATH_INFO and PATH_TRANSLATED environment
variables.</p>
-<example>
-<title>Examples</title>
-
- # Requests for files of a particular type:<br />
- Action image/gif /cgi-bin/images.cgi<br />
-<br />
- # Files of a particular file extension<br />
- AddHandler my-file-type .xyz<br />
- Action my-file-type /cgi-bin/program.cgi<br />
-</example>
+ <example><title>Examples</title>
+ # Requests for files of a particular type:<br />
+ Action image/gif /cgi-bin/images.cgi<br />
+ <br />
+ # Files of a particular file extension<br />
+ AddHandler my-file-type .xyz<br />
+ Action my-file-type /cgi-bin/program.cgi<br />
+ </example>
<p>In the first example, requests for files with a MIME content
type of <code>image/gif</code> will instead be handled by the
</usage>
<seealso><directive module="mod_mime">AddHandler</directive></seealso>
-
</directivesynopsis>
<directivesynopsis>
-
<name>Script</name>
-
<description>Activates a CGI script for a particular request
method.</description>
-<syntax> Script <em>method cgi-script</em></syntax>
+<syntax> Script <var>method cgi-script</var></syntax>
<contextlist>
<context>server config</context><context>virtual host</context>
<context>directory</context></contextlist>
<usage>
<p>This directive adds an action, which will activate
- <em>cgi-script</em> when a file is requested using the method of
- <em>method</em>. The <em>cgi-script</em> is the URL-path to a
+ <var>cgi-script</var> when a file is requested using the method of
+ <var>method</var>. The <var>cgi-script</var> is the URL-path to a
resource that has been designated as a CGI script using <directive
module="mod_alias">ScriptAliase</directive> or <directive
module="mod_mime">AddHandler</directive>. The URL and
file path of the requested document is sent using the standard CGI
PATH_INFO and PATH_TRANSLATED environment variables.</p>
-<note>
+ <note>
Any arbitrary method name may be used. <strong>Method names are
- case-sensitive</strong>, so <code>Script PUT</code> and
- <code>Script put</code> have two entirely different
+ case-sensitive</strong>, so <code>Script PUT</code> and
+ <code>Script put</code> have two entirely different
effects.
-</note>
+ </note>
<p>Note that the Script command defines default actions only.
If a CGI script is called, or some other resource that is
(<em>e.g.</em>, foo.html?hi). Otherwise, the request will
proceed normally.</p>
-<example>
-<title>Examples</title>
- # For <ISINDEX>-style searching<br />
- Script GET /cgi-bin/search<br />
- # A CGI PUT handler<br />
- Script PUT /~bob/put.cgi<br />
-</example>
+ <example><title>Examples</title>
+ # For <ISINDEX>-style searching<br />
+ Script GET /cgi-bin/search<br />
+ <br />
+ # A CGI PUT handler<br />
+ Script PUT /~bob/put.cgi<br />
+ </example>
</usage>
-
</directivesynopsis>
</modulesynopsis>
<li><img alt="" src="../images/down.gif" /> <a href="#scriptaliasmatch">ScriptAliasMatch</a></li>
</ul><h3>See also</h3><ul class="seealso"><li><code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code></li><li><a href="../urlmapping.html">Mapping URLs to the filesystem</a></li></ul></div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div><div class="directive-section"><h2><a name="Alias" id="Alias">Alias</a> <a name="alias" id="alias">Directive</a></h2><table class="directive"><tr><th><a href="directive-dict.html#Description">Description:
</a></th><td>Maps URLs to filesystem locations</td></tr><tr><th><a href="directive-dict.html#Syntax">Syntax:
- </a></th><td><code> Alias <em>URL-path
- file-path</em>|<em>directory-path</em></code></td></tr><tr><th><a href="directive-dict.html#Context">Context:
+ </a></th><td><code>Alias <var>URL-path</var>
+<var>file-path</var>|<var>directory-path</var></code></td></tr><tr><th><a href="directive-dict.html#Context">Context:
</a></th><td>server config, virtual host</td></tr><tr><th><a href="directive-dict.html#Status">Status:
</a></th><td>Base</td></tr><tr><th><a href="directive-dict.html#Module">Module:
</a></th><td>mod_alias</td></tr></table>
<p>The <code class="directive">Alias</code> directive allows documents to
be stored in the local filesystem other than under the
<code class="directive"><a href="../mod/core.html#documentroot">DocumentRoot</a></code>. URLs with a
- (%-decoded) path beginning with <em>url-path</em> will be mapped
- to local files beginning with <em>directory-filename</em>.</p>
+ (%-decoded) path beginning with <var>url-path</var> will be mapped
+ to local files beginning with <var>directory-path</var>.</p>
- <p>Example:</p>
-
-<div class="example"><p><code>Alias /image /ftp/pub/image</code></p></div>
+ <div class="example"><h3>Example:</h3><p><code>
+ Alias /image /ftp/pub/image
+ </code></p></div>
<p>A request for http://myserver/image/foo.gif would cause the
server to return the file /ftp/pub/image/foo.gif.</p>
<p>Note that if you include a trailing / on the
- <em>url-path</em> then the server will require a trailing / in
+ <var>url-path</var> then the server will require a trailing / in
order to expand the alias. That is, if you use <code>Alias
/icons/ /usr/local/apache/icons/</code> then the url
<code>/icons</code> will not be aliased.</p>
</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div><div class="directive-section"><h2><a name="AliasMatch" id="AliasMatch">AliasMatch</a> <a name="aliasmatch" id="aliasmatch">Directive</a></h2><table class="directive"><tr><th><a href="directive-dict.html#Description">Description:
</a></th><td>Maps URLs to filesystem locations using regular
expressions</td></tr><tr><th><a href="directive-dict.html#Syntax">Syntax:
- </a></th><td><code>AliasMatch <em>regex
- file-path</em>|<em>directory-path</em></code></td></tr><tr><th><a href="directive-dict.html#Context">Context:
+ </a></th><td><code>AliasMatch <var>regex</var>
+<var>file-path</var>|<var>directory-path</var></code></td></tr><tr><th><a href="directive-dict.html#Context">Context:
</a></th><td>server config, virtual host</td></tr><tr><th><a href="directive-dict.html#Status">Status:
</a></th><td>Base</td></tr><tr><th><a href="directive-dict.html#Module">Module:
</a></th><td>mod_alias</td></tr></table>
matches into the given string and use it as a filename. For
example, to activate the <code>/icons</code> directory, one might
use:</p>
-<div class="example"><p><code>
- AliasMatch ^/icons(.*) /usr/local/apache/icons$1
-</code></p></div>
+
+ <div class="example"><p><code>
+ AliasMatch ^/icons(.*) /usr/local/apache/icons$1
+ </code></p></div>
</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div><div class="directive-section"><h2><a name="Redirect" id="Redirect">Redirect</a> <a name="redirect" id="redirect">Directive</a></h2><table class="directive"><tr><th><a href="directive-dict.html#Description">Description:
</a></th><td>Sends an external redirect asking the client to fetch
a different URL</td></tr><tr><th><a href="directive-dict.html#Syntax">Syntax:
- </a></th><td><code>Redirect [<em>status</em>] <em>URL-path URL</em></code></td></tr><tr><th><a href="directive-dict.html#Context">Context:
+ </a></th><td><code>Redirect [<var>status</var>] <var>URL-path</var>
+<var>URL</var></code></td></tr><tr><th><a href="directive-dict.html#Context">Context:
</a></th><td>server config, virtual host, directory, .htaccess</td></tr><tr><th><a href="directive-dict.html#Override">Override:
</a></th><td>FileInfo</td></tr><tr><th><a href="directive-dict.html#Status">Status:
</a></th><td>Base</td></tr><tr><th><a href="directive-dict.html#Module">Module:
</a></th><td>mod_alias</td></tr></table>
<p>The Redirect directive maps an old URL into a new one. The
new URL is returned to the client which attempts to fetch it
- again with the new address. <em>URL-path</em> a (%-decoded)
+ again with the new address. <var>URL-path</var> a (%-decoded)
path; any requests for documents beginning with this path will
be returned a redirect error to a new (%-encoded) URL beginning
- with <em>URL</em>.</p>
+ with <var>URL</var>.</p>
- <p>Example:</p>
-
-<div class="example"><p><code>Redirect /service http://foo2.bar.com/service</code></p></div>
+ <div class="example"><h3>Example:</h3><p><code>
+ Redirect /service http://foo2.bar.com/service
+ </code></p></div>
<p>If the client requests http://myserver/service/foo.txt, it
will be told to access http://foo2.bar.com/service/foo.txt
<div class="note"><h3>Note</h3> <p>Redirect directives take precedence over
Alias and ScriptAlias directives, irrespective of their ordering in
-the configuration file. Also, <em>URL-path</em> must be an absolute
+the configuration file. Also, <var>URL-path</var> must be an absolute
path, not a relative path, even when used with .htaccess files or
inside of <code class="directive"><a href="../mod/core.html#directory"><Directory></a></code>
sections.</p></div>
- <p>If no <em>status</em> argument is given, the redirect will
+ <p>If no <var>status</var> argument is given, the redirect will
be "temporary" (HTTP status 302). This indicates to the client
- that the resource has moved temporarily. The <em>status</em>
+ that the resource has moved temporarily. The <var>status</var>
argument can be used to return other HTTP status codes:</p>
<dl>
<dd>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.</dd>
+ used the <var>URL</var> argument should be omitted.</dd>
</dl>
<p>Other status codes can be returned by giving the numeric
- status code as the value of <em>status</em>. If the status is
- between 300 and 399, the <em>url</em> argument must be present,
+ status code as the value of <var>status</var>. If the status is
+ between 300 and 399, the <var>URL</var> argument must be present,
otherwise it must be omitted. Note that the status must be
known to the Apache code (see the function
<code>send_error_response</code> in http_protocol.c).</p>
- <p>Example:</p>
-
- <div class="example"><p><code>
- Redirect permanent /one http://example.com/two<br />
- Redirect 303 /three http://example.com/other
+ <div class="example"><h3>Example:</h3><p><code>
+ Redirect permanent /one http://example.com/two<br />
+ Redirect 303 /three http://example.com/other
</code></p></div>
</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div><div class="directive-section"><h2><a name="RedirectMatch" id="RedirectMatch">RedirectMatch</a> <a name="redirectmatch" id="redirectmatch">Directive</a></h2><table class="directive"><tr><th><a href="directive-dict.html#Description">Description:
</a></th><td>Sends an external redirect based on a regular expression match
of the current URL</td></tr><tr><th><a href="directive-dict.html#Syntax">Syntax:
- </a></th><td><code>RedirectMatch [<em>status</em>] <em>regex URL</em></code></td></tr><tr><th><a href="directive-dict.html#Context">Context:
+ </a></th><td><code>RedirectMatch [<var>status</var>] <var>regex</var>
+<var>URL</var></code></td></tr><tr><th><a href="directive-dict.html#Context">Context:
</a></th><td>server config, virtual host, directory, .htaccess</td></tr><tr><th><a href="directive-dict.html#Override">Override:
</a></th><td>FileInfo</td></tr><tr><th><a href="directive-dict.html#Status">Status:
</a></th><td>Base</td></tr><tr><th><a href="directive-dict.html#Module">Module:
matches into the given string and use it as a filename. For
example, to redirect all GIF files to like-named JPEG files on
another server, one might use:</p>
-<div class="example"><p><code>
- RedirectMatch (.*)\.gif$ http://www.anotherserver.com$1.jpg
-</code></p></div>
+
+ <div class="example"><p><code>
+ RedirectMatch (.*)\.gif$ http://www.anotherserver.com$1.jpg
+ </code></p></div>
</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div><div class="directive-section"><h2><a name="RedirectPermanent" id="RedirectPermanent">RedirectPermanent</a> <a name="redirectpermanent" id="redirectpermanent">Directive</a></h2><table class="directive"><tr><th><a href="directive-dict.html#Description">Description:
</a></th><td>Sends an external permanent redirect asking the client to fetch
a different URL</td></tr><tr><th><a href="directive-dict.html#Syntax">Syntax:
- </a></th><td><code>RedirectPermanent <em>URL-path URL</em></code></td></tr><tr><th><a href="directive-dict.html#Context">Context:
+ </a></th><td><code>RedirectPermanent <var>URL-path</var> <var>URL</var></code></td></tr><tr><th><a href="directive-dict.html#Context">Context:
</a></th><td>server config, virtual host, directory, .htaccess</td></tr><tr><th><a href="directive-dict.html#Override">Override:
</a></th><td>FileInfo</td></tr><tr><th><a href="directive-dict.html#Status">Status:
</a></th><td>Base</td></tr><tr><th><a href="directive-dict.html#Module">Module:
</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div><div class="directive-section"><h2><a name="RedirectTemp" id="RedirectTemp">RedirectTemp</a> <a name="redirecttemp" id="redirecttemp">Directive</a></h2><table class="directive"><tr><th><a href="directive-dict.html#Description">Description:
</a></th><td>Sends an external temporary redirect asking the client to fetch
a different URL</td></tr><tr><th><a href="directive-dict.html#Syntax">Syntax:
- </a></th><td><code>RedirectTemp <em>URL-path URL</em></code></td></tr><tr><th><a href="directive-dict.html#Context">Context:
+ </a></th><td><code>RedirectTemp <var>URL-path</var> <var>URL</var></code></td></tr><tr><th><a href="directive-dict.html#Context">Context:
</a></th><td>server config, virtual host, directory, .htaccess</td></tr><tr><th><a href="directive-dict.html#Override">Override:
</a></th><td>FileInfo</td></tr><tr><th><a href="directive-dict.html#Status">Status:
</a></th><td>Base</td></tr><tr><th><a href="directive-dict.html#Module">Module:
</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div><div class="directive-section"><h2><a name="ScriptAlias" id="ScriptAlias">ScriptAlias</a> <a name="scriptalias" id="scriptalias">Directive</a></h2><table class="directive"><tr><th><a href="directive-dict.html#Description">Description:
</a></th><td>Maps a URL to a filesystem location and designates the
target as a CGI script</td></tr><tr><th><a href="directive-dict.html#Syntax">Syntax:
- </a></th><td><code>ScriptAlias
-<em>URL-path file-path</em>|<em>directory-path</em></code></td></tr><tr><th><a href="directive-dict.html#Context">Context:
+ </a></th><td><code>ScriptAlias <var>URL-path</var>
+<var>file-path</var>|<var>directory-path</var></code></td></tr><tr><th><a href="directive-dict.html#Context">Context:
</a></th><td>server config, virtual host</td></tr><tr><th><a href="directive-dict.html#Status">Status:
</a></th><td>Base</td></tr><tr><th><a href="directive-dict.html#Module">Module:
</a></th><td>mod_alias</td></tr></table>
behavior as the <code class="directive"><a href="#alias">Alias</a></code>
directive, except that in addition it marks the target directory
as containing CGI scripts that will be processed by <code class="module"><a href="../mod/mod_cgi.html">mod_cgi</a></code>'s cgi-script handler. URLs with a
- (%-decoded) path beginning with <em>URL-path</em> will be mapped
+ (%-decoded) path beginning with <var>URL-path</var> will be mapped
to scripts beginning with the second argument which is a full
pathname in the local filesystem.</p>
- <p>Example:</p>
-
-<div class="example"><p><code>ScriptAlias /cgi-bin/ /web/cgi-bin/</code></p></div>
+ <div class="example"><h3>Example:</h3><p><code>
+ ScriptAlias /cgi-bin/ /web/cgi-bin/
+ </code></p></div>
<p>A request for <code>http://myserver/cgi-bin/foo</code> would cause the
server to run the script <code>/web/cgi-bin/foo</code>.</p>
</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div><div class="directive-section"><h2><a name="ScriptAliasMatch" id="ScriptAliasMatch">ScriptAliasMatch</a> <a name="scriptaliasmatch" id="scriptaliasmatch">Directive</a></h2><table class="directive"><tr><th><a href="directive-dict.html#Description">Description:
</a></th><td>Maps a URL to a filesystem location using a regular expression
and designates the target as a CGI script</td></tr><tr><th><a href="directive-dict.html#Syntax">Syntax:
- </a></th><td><code>ScriptAliasMatch
-<em>regex file-path</em>|<em>directory-path</em></code></td></tr><tr><th><a href="directive-dict.html#Context">Context:
+ </a></th><td><code>ScriptAliasMatch <var>regex</var>
+<var>file-path</var>|<var>directory-path</var></code></td></tr><tr><th><a href="directive-dict.html#Context">Context:
</a></th><td>server config, virtual host</td></tr><tr><th><a href="directive-dict.html#Status">Status:
</a></th><td>Base</td></tr><tr><th><a href="directive-dict.html#Module">Module:
</a></th><td>mod_alias</td></tr></table>
matches into the given string and use it as a filename. For
example, to activate the standard <code>/cgi-bin</code>, one
might use:</p>
-<div class="example"><p><code>
- ScriptAliasMatch ^/cgi-bin(.*) /usr/local/apache/cgi-bin$1
-</code></p></div>
+
+ <div class="example"><p><code>
+ ScriptAliasMatch ^/cgi-bin(.*) /usr/local/apache/cgi-bin$1
+ </code></p></div>
</div></div><div id="footer"><p class="apache">Maintained by the <a href="http://httpd.apache.org/docs-project/">Apache HTTP Server Documentation Project</a></p><p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p></div></body></html>
\ No newline at end of file
<directivesynopsis>
<name>Alias</name>
<description>Maps URLs to filesystem locations</description>
-<syntax> Alias <em>URL-path
- file-path</em>|<em>directory-path</em></syntax>
+<syntax>Alias <var>URL-path</var>
+<var>file-path</var>|<var>directory-path</var></syntax>
<contextlist><context>server config</context><context>virtual host</context>
</contextlist>
<p>The <directive>Alias</directive> directive allows documents to
be stored in the local filesystem other than under the
<directive module="core">DocumentRoot</directive>. URLs with a
- (%-decoded) path beginning with <em>url-path</em> will be mapped
- to local files beginning with <em>directory-filename</em>.</p>
+ (%-decoded) path beginning with <var>url-path</var> will be mapped
+ to local files beginning with <var>directory-path</var>.</p>
- <p>Example:</p>
-
-<example>Alias /image /ftp/pub/image</example>
+ <example><title>Example:</title>
+ Alias /image /ftp/pub/image
+ </example>
<p>A request for http://myserver/image/foo.gif would cause the
server to return the file /ftp/pub/image/foo.gif.</p>
<p>Note that if you include a trailing / on the
- <em>url-path</em> then the server will require a trailing / in
+ <var>url-path</var> then the server will require a trailing / in
order to expand the alias. That is, if you use <code>Alias
/icons/ /usr/local/apache/icons/</code> then the url
<code>/icons</code> will not be aliased.</p>
<name>AliasMatch</name>
<description>Maps URLs to filesystem locations using regular
expressions</description>
-<syntax>AliasMatch <em>regex
- file-path</em>|<em>directory-path</em></syntax>
+<syntax>AliasMatch <var>regex</var>
+<var>file-path</var>|<var>directory-path</var></syntax>
<contextlist><context>server config</context><context>virtual host</context>
</contextlist>
matches into the given string and use it as a filename. For
example, to activate the <code>/icons</code> directory, one might
use:</p>
-<example>
- AliasMatch ^/icons(.*) /usr/local/apache/icons$1
-</example>
+
+ <example>
+ AliasMatch ^/icons(.*) /usr/local/apache/icons$1
+ </example>
</usage>
</directivesynopsis>
<name>Redirect</name>
<description>Sends an external redirect asking the client to fetch
a different URL</description>
-<syntax>Redirect [<em>status</em>] <em>URL-path URL</em></syntax>
+<syntax>Redirect [<var>status</var>] <var>URL-path</var>
+<var>URL</var></syntax>
<contextlist><context>server config</context><context>virtual host</context>
<context>directory</context><context>.htaccess</context></contextlist>
<override>FileInfo</override>
<usage>
<p>The Redirect directive maps an old URL into a new one. The
new URL is returned to the client which attempts to fetch it
- again with the new address. <em>URL-path</em> a (%-decoded)
+ again with the new address. <var>URL-path</var> a (%-decoded)
path; any requests for documents beginning with this path will
be returned a redirect error to a new (%-encoded) URL beginning
- with <em>URL</em>.</p>
+ with <var>URL</var>.</p>
- <p>Example:</p>
-
-<example>Redirect /service http://foo2.bar.com/service</example>
+ <example><title>Example:</title>
+ Redirect /service http://foo2.bar.com/service
+ </example>
<p>If the client requests http://myserver/service/foo.txt, it
will be told to access http://foo2.bar.com/service/foo.txt
<note><title>Note</title> <p>Redirect directives take precedence over
Alias and ScriptAlias directives, irrespective of their ordering in
-the configuration file. Also, <em>URL-path</em> must be an absolute
+the configuration file. Also, <var>URL-path</var> must be an absolute
path, not a relative path, even when used with .htaccess files or
inside of <directive type="section" module="core">Directory</directive>
sections.</p></note>
- <p>If no <em>status</em> argument is given, the redirect will
+ <p>If no <var>status</var> argument is given, the redirect will
be "temporary" (HTTP status 302). This indicates to the client
- that the resource has moved temporarily. The <em>status</em>
+ that the resource has moved temporarily. The <var>status</var>
argument can be used to return other HTTP status codes:</p>
<dl>
<dd>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.</dd>
+ used the <var>URL</var> argument should be omitted.</dd>
</dl>
<p>Other status codes can be returned by giving the numeric
- status code as the value of <em>status</em>. If the status is
- between 300 and 399, the <em>url</em> argument must be present,
+ status code as the value of <var>status</var>. If the status is
+ between 300 and 399, the <var>URL</var> argument must be present,
otherwise it must be omitted. Note that the status must be
known to the Apache code (see the function
<code>send_error_response</code> in http_protocol.c).</p>
- <p>Example:</p>
-
- <example>
- Redirect permanent /one http://example.com/two<br />
- Redirect 303 /three http://example.com/other
+ <example><title>Example:</title>
+ Redirect permanent /one http://example.com/two<br />
+ Redirect 303 /three http://example.com/other
</example>
</usage>
<name>RedirectMatch</name>
<description>Sends an external redirect based on a regular expression match
of the current URL</description>
-<syntax>RedirectMatch [<em>status</em>] <em>regex URL</em></syntax>
+<syntax>RedirectMatch [<var>status</var>] <var>regex</var>
+<var>URL</var></syntax>
<contextlist><context>server config</context><context>virtual host</context>
<context>directory</context><context>.htaccess</context></contextlist>
<override>FileInfo</override>
matches into the given string and use it as a filename. For
example, to redirect all GIF files to like-named JPEG files on
another server, one might use:</p>
-<example>
- RedirectMatch (.*)\.gif$ http://www.anotherserver.com$1.jpg
-</example>
+
+ <example>
+ RedirectMatch (.*)\.gif$ http://www.anotherserver.com$1.jpg
+ </example>
</usage>
</directivesynopsis>
<name>RedirectTemp</name>
<description>Sends an external temporary redirect asking the client to fetch
a different URL</description>
-<syntax>RedirectTemp <em>URL-path URL</em></syntax>
+<syntax>RedirectTemp <var>URL-path</var> <var>URL</var></syntax>
<contextlist><context>server config</context><context>virtual host</context>
<context>directory</context><context>.htaccess</context></contextlist>
<override>FileInfo</override>
<name>RedirectPermanent</name>
<description>Sends an external permanent redirect asking the client to fetch
a different URL</description>
-<syntax>RedirectPermanent <em>URL-path URL</em></syntax>
+<syntax>RedirectPermanent <var>URL-path</var> <var>URL</var></syntax>
<contextlist><context>server config</context><context>virtual host</context>
<context>directory</context><context>.htaccess</context></contextlist>
<override>FileInfo</override>
<name>ScriptAlias</name>
<description>Maps a URL to a filesystem location and designates the
target as a CGI script</description>
-<syntax>ScriptAlias
-<em>URL-path file-path</em>|<em>directory-path</em></syntax>
+<syntax>ScriptAlias <var>URL-path</var>
+<var>file-path</var>|<var>directory-path</var></syntax>
<contextlist><context>server config</context><context>virtual host</context>
</contextlist>
directive, except that in addition it marks the target directory
as containing CGI scripts that will be processed by <module
>mod_cgi</module>'s cgi-script handler. URLs with a
- (%-decoded) path beginning with <em>URL-path</em> will be mapped
+ (%-decoded) path beginning with <var>URL-path</var> will be mapped
to scripts beginning with the second argument which is a full
pathname in the local filesystem.</p>
- <p>Example:</p>
-
-<example>ScriptAlias /cgi-bin/ /web/cgi-bin/</example>
+ <example><title>Example:</title>
+ ScriptAlias /cgi-bin/ /web/cgi-bin/
+ </example>
<p>A request for <code>http://myserver/cgi-bin/foo</code> would cause the
server to run the script <code>/web/cgi-bin/foo</code>.</p>
<name>ScriptAliasMatch</name>
<description>Maps a URL to a filesystem location using a regular expression
and designates the target as a CGI script</description>
-<syntax>ScriptAliasMatch
-<em>regex file-path</em>|<em>directory-path</em></syntax>
+<syntax>ScriptAliasMatch <var>regex</var>
+<var>file-path</var>|<var>directory-path</var></syntax>
<contextlist><context>server config</context><context>virtual host</context>
</contextlist>
matches into the given string and use it as a filename. For
example, to activate the standard <code>/cgi-bin</code>, one
might use:</p>
-<example>
- ScriptAliasMatch ^/cgi-bin(.*) /usr/local/apache/cgi-bin$1
-</example>
+
+ <example>
+ ScriptAliasMatch ^/cgi-bin(.*) /usr/local/apache/cgi-bin$1
+ </example>
</usage>
</directivesynopsis>
<p>For historical reasons, this module will also process any
file with the mime type <code>httpd/send-as-is</code>.</p>
-</div><div id="quickview"><h3 class="directives">Directives</h3><p>This module provides no directives.</p><h3>Topics</h3><ul id="topics"><li><img alt="" src="../images/down.gif" /> Usage</li></ul><h3>See also</h3><ul class="seealso"><li><code class="module"><a href="../mod/mod_headers.html">mod_headers</a></code></li><li><code class="module"><a href="../mod/mod_cern_meta.html">mod_cern_meta</a></code></li></ul></div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div><div class="section"><h2>Usage</h2>
+</div><div id="quickview"><h3 class="directives">Directives</h3><p>This module provides no directives.</p><h3>Topics</h3><ul id="topics"><li><img alt="" src="../images/down.gif" /> <a href="#usage">Usage</a></li></ul><h3>See also</h3><ul class="seealso"><li><code class="module"><a href="../mod/mod_headers.html">mod_headers</a></code></li><li><code class="module"><a href="../mod/mod_cern_meta.html">mod_cern_meta</a></code></li><li><a href="../handler.html">Apache's Handler Use</a></li></ul></div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div><div class="section"><h2><a name="usage" id="usage">Usage</a></h2>
<p>In the server configuration file, associate files with the
<code>send-as-is</code> handler <em>e.g.</em></p>
-<div class="example"><p><code>AddHandler send-as-is asis</code></p></div>
+ <div class="example"><p><code>AddHandler send-as-is asis</code></p></div>
<p>The contents of any file with a <code>.asis</code> extension
will then be sent by Apache to the client with almost no
redirected.</p>
-<div class="example"><p><code>Status: 301 Now where did I leave that URL<br />
- Location: http://xyz.abc.com/foo/bar.html<br />
- Content-type: text/html<br />
+ <div class="example"><p><code>
+ Status: 301 Now where did I leave that URL<br />
+ Location: http://xyz.abc.com/foo/bar.html<br />
+ Content-type: text/html<br />
<br />
- <HTML><br />
- <HEAD><br />
- <TITLE>Lame excuses'R'us</TITLE><br />
- </HEAD><br />
- <BODY><br />
- <H1>Fred's exceptionally wonderful page has moved
- to<br />
- <A
- HREF="http://xyz.abc.com/foo/bar.html">Joe's</A>
+ <html><br />
+ <head><br />
+ <title>Lame excuses'R'us</title><br />
+ </head><br />
+ <body><br />
+ <h1>Fred's exceptionally wonderful page has moved to<br />
+ <a href="http://xyz.abc.com/foo/bar.html">Joe's</a>
site.<br />
- </H1><br />
- </BODY><br />
- </HTML>
-</code></p></div>
+ </h1><br />
+ </body><br />
+ </html>
+ </code></p></div>
- <p>Notes: the server always adds a Date: and Server: header to
- the data returned to the client, so these should not be
+ <div class="note"><h3>Notes:</h3>
+ <p>The server always adds a <code>Date:</code> and <code>Server:</code>
+ header to the data returned to the client, so these should not be
included in the file. The server does <em>not</em> add a
- Last-Modified header; it probably should. </p>
+ <code>Last-Modified</code> header; it probably should.</p>
+ </div>
</div></div><div id="footer"><p class="apache">Maintained by the <a href="http://httpd.apache.org/docs-project/">Apache HTTP Server Documentation Project</a></p><p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p></div></body></html>
\ No newline at end of file
<seealso><module>mod_headers</module></seealso>
<seealso><module>mod_cern_meta</module></seealso>
+<seealso><a href="../handler.html">Apache's Handler Use</a></seealso>
-<section><title>Usage</title>
+<section id="usage"><title>Usage</title>
<p>In the server configuration file, associate files with the
<code>send-as-is</code> handler <em>e.g.</em></p>
-<example>AddHandler send-as-is asis</example>
+ <example>AddHandler send-as-is asis</example>
<p>The contents of any file with a <code>.asis</code> extension
will then be sent by Apache to the client with almost no
redirected.</p>
-<example>Status: 301 Now where did I leave that URL<br />
- Location: http://xyz.abc.com/foo/bar.html<br />
- Content-type: text/html<br />
+ <example>
+ Status: 301 Now where did I leave that URL<br />
+ Location: http://xyz.abc.com/foo/bar.html<br />
+ Content-type: text/html<br />
<br />
- <HTML><br />
- <HEAD><br />
- <TITLE>Lame excuses'R'us</TITLE><br />
- </HEAD><br />
- <BODY><br />
- <H1>Fred's exceptionally wonderful page has moved
- to<br />
- <A
- HREF="http://xyz.abc.com/foo/bar.html">Joe's</A>
+ <html><br />
+ <head><br />
+ <title>Lame excuses'R'us</title><br />
+ </head><br />
+ <body><br />
+ <h1>Fred's exceptionally wonderful page has moved to<br />
+ <a href="http://xyz.abc.com/foo/bar.html">Joe's</a>
site.<br />
- </H1><br />
- </BODY><br />
- </HTML>
-</example>
+ </h1><br />
+ </body><br />
+ </html>
+ </example>
- <p>Notes: the server always adds a Date: and Server: header to
- the data returned to the client, so these should not be
+ <note><title>Notes:</title>
+ <p>The server always adds a <code>Date:</code> and <code>Server:</code>
+ header to the data returned to the client, so these should not be
included in the file. The server does <em>not</em> add a
- Last-Modified header; it probably should. </p>
+ <code>Last-Modified</code> header; it probably should.</p>
+ </note>
</section>
</modulesynopsis>
accepting requests on network sockets</td></tr>
<tr class="odd"><td><a href="core.html#acceptpathinfo">AcceptPathInfo On|Off|Default</a></td><td> Default </td><td>svdh</td><td>C</td></tr><tr class="odd"><td class="descr" colspan="4">Resources accept trailing pathname information</td></tr>
<tr><td><a href="core.html#accessfilename">AccessFileName <var>filename</var> [<var>filename</var>] ...</a></td><td> .htaccess </td><td>sv</td><td>C</td></tr><tr><td class="descr" colspan="4">Name of the distributed configuration file</td></tr>
-<tr class="odd"><td><a href="mod_actions.html#action">Action <em>action-type cgi-script</em></a></td><td /><td>svdh</td><td>B</td></tr><tr class="odd"><td class="descr" colspan="4">Activates a CGI script for a particular handler or
+<tr class="odd"><td><a href="mod_actions.html#action">Action <var>action-type</var> <var>cgi-script</var></a></td><td /><td>svdh</td><td>B</td></tr><tr class="odd"><td class="descr" colspan="4">Activates a CGI script for a particular handler or
content-type</td></tr>
<tr><td><a href="mod_autoindex.html#addalt">AddAlt <em>string file</em> [<em>file</em>] ...</a></td><td /><td>svdh</td><td>B</td></tr><tr><td class="descr" colspan="4">Alternate text to display for a file, instead of an
icon selected by filename</td></tr>
<tr><td><a href="mod_mime.html#addtype">AddType <em>MIME-type
extension</em> [<em>extension</em>] ...</a></td><td /><td>svdh</td><td>B</td></tr><tr><td class="descr" colspan="4">Maps the given filename extensions
onto the specified content type</td></tr>
-<tr class="odd"><td><a href="mod_alias.html#alias"> Alias <em>URL-path
- file-path</em>|<em>directory-path</em></a></td><td /><td>sv</td><td>B</td></tr><tr class="odd"><td class="descr" colspan="4">Maps URLs to filesystem locations</td></tr>
-<tr><td><a href="mod_alias.html#aliasmatch">AliasMatch <em>regex
- file-path</em>|<em>directory-path</em></a></td><td /><td>sv</td><td>B</td></tr><tr><td class="descr" colspan="4">Maps URLs to filesystem locations using regular
+<tr class="odd"><td><a href="mod_alias.html#alias">Alias <var>URL-path</var>
+<var>file-path</var>|<var>directory-path</var></a></td><td /><td>sv</td><td>B</td></tr><tr class="odd"><td class="descr" colspan="4">Maps URLs to filesystem locations</td></tr>
+<tr><td><a href="mod_alias.html#aliasmatch">AliasMatch <var>regex</var>
+<var>file-path</var>|<var>directory-path</var></a></td><td /><td>sv</td><td>B</td></tr><tr><td class="descr" colspan="4">Maps URLs to filesystem locations using regular
expressions</td></tr>
<tr class="odd"><td><a href="mod_authz_host.html#allow"> Allow from
all|<em>host</em>|env=<em>env-variable</em>
header for proxied requests</td></tr>
<tr class="odd"><td><a href="mod_autoindex.html#readmename" id="R" name="R">ReadmeName <em>filename</em></a></td><td /><td>svdh</td><td>B</td></tr><tr class="odd"><td class="descr" colspan="4">Name of the file that will be inserted at the end
of the index listing</td></tr>
-<tr><td><a href="mod_alias.html#redirect">Redirect [<em>status</em>] <em>URL-path URL</em></a></td><td /><td>svdh</td><td>B</td></tr><tr><td class="descr" colspan="4">Sends an external redirect asking the client to fetch
+<tr><td><a href="mod_alias.html#redirect">Redirect [<var>status</var>] <var>URL-path</var>
+<var>URL</var></a></td><td /><td>svdh</td><td>B</td></tr><tr><td class="descr" colspan="4">Sends an external redirect asking the client to fetch
a different URL</td></tr>
-<tr class="odd"><td><a href="mod_alias.html#redirectmatch">RedirectMatch [<em>status</em>] <em>regex URL</em></a></td><td /><td>svdh</td><td>B</td></tr><tr class="odd"><td class="descr" colspan="4">Sends an external redirect based on a regular expression match
+<tr class="odd"><td><a href="mod_alias.html#redirectmatch">RedirectMatch [<var>status</var>] <var>regex</var>
+<var>URL</var></a></td><td /><td>svdh</td><td>B</td></tr><tr class="odd"><td class="descr" colspan="4">Sends an external redirect based on a regular expression match
of the current URL</td></tr>
-<tr><td><a href="mod_alias.html#redirectpermanent">RedirectPermanent <em>URL-path URL</em></a></td><td /><td>svdh</td><td>B</td></tr><tr><td class="descr" colspan="4">Sends an external permanent redirect asking the client to fetch
+<tr><td><a href="mod_alias.html#redirectpermanent">RedirectPermanent <var>URL-path</var> <var>URL</var></a></td><td /><td>svdh</td><td>B</td></tr><tr><td class="descr" colspan="4">Sends an external permanent redirect asking the client to fetch
a different URL</td></tr>
-<tr class="odd"><td><a href="mod_alias.html#redirecttemp">RedirectTemp <em>URL-path URL</em></a></td><td /><td>svdh</td><td>B</td></tr><tr class="odd"><td class="descr" colspan="4">Sends an external temporary redirect asking the client to fetch
+<tr class="odd"><td><a href="mod_alias.html#redirecttemp">RedirectTemp <var>URL-path</var> <var>URL</var></a></td><td /><td>svdh</td><td>B</td></tr><tr class="odd"><td class="descr" colspan="4">Sends an external temporary redirect asking the client to fetch
a different URL</td></tr>
<tr><td><a href="mod_mime.html#removecharset">RemoveCharset
<em>extension</em> [<em>extension</em>] ...</a></td><td /><td>vdh</td><td>B</td></tr><tr><td class="descr" colspan="4">Removes any character set associations for a set of file
user authentication</td></tr>
<tr><td><a href="mpm_common.html#scoreboardfile">ScoreBoardFile <var>file-path</var></a></td><td> logs/apache_status </td><td>s</td><td>M</td></tr><tr><td class="descr" colspan="4">Location of the file used to store coordination data for
the child processes</td></tr>
-<tr class="odd"><td><a href="mod_actions.html#script"> Script <em>method cgi-script</em></a></td><td /><td>svd</td><td>B</td></tr><tr class="odd"><td class="descr" colspan="4">Activates a CGI script for a particular request
+<tr class="odd"><td><a href="mod_actions.html#script"> Script <var>method cgi-script</var></a></td><td /><td>svd</td><td>B</td></tr><tr class="odd"><td class="descr" colspan="4">Activates a CGI script for a particular request
method.</td></tr>
-<tr><td><a href="mod_alias.html#scriptalias">ScriptAlias
-<em>URL-path file-path</em>|<em>directory-path</em></a></td><td /><td>sv</td><td>B</td></tr><tr><td class="descr" colspan="4">Maps a URL to a filesystem location and designates the
+<tr><td><a href="mod_alias.html#scriptalias">ScriptAlias <var>URL-path</var>
+<var>file-path</var>|<var>directory-path</var></a></td><td /><td>sv</td><td>B</td></tr><tr><td class="descr" colspan="4">Maps a URL to a filesystem location and designates the
target as a CGI script</td></tr>
-<tr class="odd"><td><a href="mod_alias.html#scriptaliasmatch">ScriptAliasMatch
-<em>regex file-path</em>|<em>directory-path</em></a></td><td /><td>sv</td><td>B</td></tr><tr class="odd"><td class="descr" colspan="4">Maps a URL to a filesystem location using a regular expression
+<tr class="odd"><td><a href="mod_alias.html#scriptaliasmatch">ScriptAliasMatch <var>regex</var>
+<var>file-path</var>|<var>directory-path</var></a></td><td /><td>sv</td><td>B</td></tr><tr class="odd"><td class="descr" colspan="4">Maps a URL to a filesystem location using a regular expression
and designates the target as a CGI script</td></tr>
<tr><td><a href="core.html#scriptinterpretersource">ScriptInterpreterSource registry|script</a></td><td> script </td><td>svdh</td><td>C</td></tr><tr><td class="descr" colspan="4">Technique for locating the interpreter for CGI
scripts</td></tr>