mod_actions.html revision 2eaf662cbc81e823e8d9aeb8d54e69e63032493e
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Module mod_actions</title>
</head>
<!-- Background white, links blue (unvisited), navy (visited), red (active) -->
<body bgcolor="#FFFFFF" text="#000000" link="#0000FF"
vlink="#000080" alink="#FF0000">
<!--#include virtual="header.html" -->
<h1 align="CENTER">Module mod_actions</h1>
<p>This module provides for executing CGI scripts based on
media type or request method.</p>
rel="Help"><strong>Status:</strong></a> Base<br />
<a href="module-dict.html#SourceFile"
rel="Help"><strong>Source File:</strong></a>
mod_actions.c<br />
<a href="module-dict.html#ModuleIdentifier"
rel="Help"><strong>Module Identifier:</strong></a>
actions_module</p>
<h2>Summary</h2>
<p>This module has two directives. The Action directive lets
you run CGI scripts whenever a file of a certain type is
requested. The Script directive lets you run CGI scripts
whenever a particular method is used in a request. This makes
it much easier to execute scripts that process files.</p>
<h2>Directives</h2>
<ul>
<li><a href="#action">Action</a></li>
<li><a href="#script">Script</a></li>
</ul>
<hr />
<h2><a id="action" name="action">Action directive</a></h2>
rel="Help"><strong>Syntax:</strong></a> Action <em>action-type
cgi-script</em><br />
<a href="directive-dict.html#Context"
rel="Help"><strong>Context:</strong></a> server config, virtual
host, directory, .htaccess<br />
<a href="directive-dict.html#Override"
rel="Help"><strong>Override:</strong></a> FileInfo<br />
<a href="directive-dict.html#Status"
rel="Help"><strong>Status:</strong></a> Base<br />
<a href="directive-dict.html#Module"
rel="Help"><strong>Module:</strong></a> mod_actions</p>
<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>action-type</em> 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>
<hr />
<h2><a id="script" name="script">Script directive</a></h2>
rel="Help"><strong>Syntax:</strong></a> Script <em>method
cgi-script</em><br />
<a href="directive-dict.html#Context"
rel="Help"><strong>Context:</strong></a> server config, virtual
host, directory<br />
<a href="directive-dict.html#Status"
rel="Help"><strong>Status:</strong></a> Base<br />
<a href="directive-dict.html#Module"
rel="Help"><strong>Module:</strong></a> mod_actions</p>
<p>This directive adds an action, which will activate
<i>cgi-script</i> when a file is requested using the method of
<i>method</i>. It sends the URL and file path of the requested
document using the standard CGI PATH_INFO and PATH_TRANSLATED
environment variables.</p>
<blockquote>
Any arbitrary method name may be used. <b>Method names are
case-sensitive</b>, so <code>Script PUT</code> and
<code>Script put</code> have two entirely different
effects.
</blockquote>
<p>Note that the Script command defines default actions only.
If a CGI script is called, or some other resource that is
capable of handling the requested method internally, it will do
so. Also note that Script with a method of <code>GET</code>
will only be called if there are query arguments present
proceed normally.</p>
<p>Examples:</p>
<pre>
# For <ISINDEX>-style searching
# A CGI PUT handler
</pre>
<!--#include virtual="footer.html" -->
</body>
</html>