1 <html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><!--
2 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
3 This file is generated from xml source: DO NOT EDIT
4 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
5 --><title>mod_actions - Apache HTTP Server</title><link href="../style/manual.css" type="text/css" rel="stylesheet"></head><body><blockquote><div align="center"><img src="../images/sub.gif" alt="[APACHE DOCUMENTATION]"><h3>Apache HTTP Server Version 2.0</h3></div><h1 align="center">Apache Module mod_actions</h1><table cellspacing="1" cellpadding="0" bgcolor="#cccccc"><tr><td><table bgcolor="#ffffff"><tr><td nowrap="nowrap" valign="top"><span class="help">Description:
6 </span></td><td>This module provides for executing CGI scripts based on
7 media type or request method.</td></tr><tr><td nowrap="nowrap"><a href="module-dict.html#Status" class="help">Status:
8 </a></td><td>Base</td></tr><tr><td nowrap="nowrap"><a href="module-dict.html#ModuleIdentifier" class="help">Module Identifier:
9 </a></td><td>actions_module</td></tr></table></td></tr></table><h2>Summary</h2>
10 <p>This module has two directives. The <a href="#action" class="directive"><code class="directive">Action</code></a> directive lets you run CGI
11 scripts whenever a file of a certain type is requested. The
12 <a href="#script" class="directive"><code class="directive">Script</code></a> directive lets
13 you run CGI scripts whenever a particular method is used in a
14 request. This makes it much easier to execute scripts that process
16 <h2>Directives</h2><ul><li><a href="#action">Action</a></li><li><a href="#script">Script</a></li></ul><hr><h2><a name="Action">Action</a> <a name="action">Directive</a></h2><table cellpadding="1" cellspacing="0" border="0" bgcolor="#cccccc"><tr><td><table bgcolor="#ffffff"><tr><td nowrap="nowrap"><strong>Description:
17 </strong></td><td>Activates a CGI script for a particular handler or
18 content-type</td></tr><tr><td nowrap="nowrap"><a href="directive-dict.html#Syntax" class="help">Syntax:
19 </a></td><td>Action <em>action-type cgi-script</em></td></tr><tr><td nowrap="nowrap"><a href="directive-dict.html#Context" class="help">Context:
20 </a></td><td>server config, virtual host, directory, .htaccess</td></tr><tr><td nowrap="nowrap"><a href="directive-dict.html#Override" class="help">Override:
21 </a></td><td>FileInfo</td></tr><tr><td nowrap="nowrap"><a href="directive-dict.html#Status" class="help">Status:
22 </a></td><td>Base</td></tr><tr><td nowrap="nowrap"><a href="directive-dict.html#Module" class="help">Module:
23 </a></td><td>mod_actions</td></tr></table></td></tr></table>
24 <p>This directive adds an action, which will activate
25 <em>cgi-script</em> when <em>action-type</em> is triggered by the
26 request. The <em>cgi-script</em> is the URL-path to a resource
27 that has been designated as a CGI script using <a href="../mod/mod_alias.html#scriptalias" class="directive"><code class="directive">ScriptAlias</code></a> or <a href="../mod/mod_mime.html#addhandler" class="directive"><code class="directive">AddHandler</code></a>. The
28 <em>action-type</em> can be either a <a href="../handler.html">handler</a> or a MIME content type. It
29 sends the URL and file path of the requested document using the
30 standard CGI PATH_INFO and PATH_TRANSLATED environment
33 <blockquote><table cellpadding="10"><tr><td bgcolor="#eeeeee"><p align="center"><strong>Examples</strong></p><code>
36 # Requests for files of a particular type:<br>
37 Action image/gif /cgi-bin/images.cgi<br>
39 # Files of a particular file extension<br>
40 AddHandler my-file-type .xyz<br>
41 Action my-file-type /cgi-bin/program.cgi<br>
42 </code></td></tr></table></blockquote>
44 <p>In the first example, requests for files with a MIME content
45 type of <code>image/gif</code> will instead be handled by the
46 specified cgi script <code>/cgi-bin/images.cgi</code>.</p>
48 <p>In the second example, requests for files with a file extension of
49 <code>.xyz</code> are handled instead by the specified cgi script
50 <code>/cgi-bin/program.cgi</code>.</p>
51 <p><strong>See also </strong></p><ul><li><a href="../mod/mod_mime.html#addhandler" class="directive"><code class="directive">AddHandler</code></a></li></ul><hr><h2><a name="Script">Script</a> <a name="script">Directive</a></h2><table cellpadding="1" cellspacing="0" border="0" bgcolor="#cccccc"><tr><td><table bgcolor="#ffffff"><tr><td nowrap="nowrap"><strong>Description:
52 </strong></td><td>Activates a CGI script for a particular request
53 method.</td></tr><tr><td nowrap="nowrap"><a href="directive-dict.html#Syntax" class="help">Syntax:
54 </a></td><td> Script <em>method cgi-script</em></td></tr><tr><td nowrap="nowrap"><a href="directive-dict.html#Context" class="help">Context:
55 </a></td><td>server config, virtual host, directory</td></tr><tr><td nowrap="nowrap"><a href="directive-dict.html#Status" class="help">Status:
56 </a></td><td>Base</td></tr><tr><td nowrap="nowrap"><a href="directive-dict.html#Module" class="help">Module:
57 </a></td><td>mod_actions</td></tr></table></td></tr></table>
58 <p>This directive adds an action, which will activate
59 <em>cgi-script</em> when a file is requested using the method of
60 <em>method</em>. The <em>cgi-script</em> is the URL-path to a
61 resource that has been designated as a CGI script using <a href="../mod/mod_alias.html#scriptaliase" class="directive"><code class="directive">ScriptAliase</code></a> or <a href="../mod/mod_mime.html#addhandler" class="directive"><code class="directive">AddHandler</code></a>. The URL and
62 file path of the requested document is sent using the standard CGI
63 PATH_INFO and PATH_TRANSLATED environment variables.</p>
65 <blockquote><table><tr><td bgcolor="#e0e5f5">
66 Any arbitrary method name may be used. <strong>Method names are
67 case-sensitive</strong>, so <code>Script PUT</code> and
68 <code>Script put</code> have two entirely different
70 </td></tr></table></blockquote>
72 <p>Note that the Script command defines default actions only.
73 If a CGI script is called, or some other resource that is
74 capable of handling the requested method internally, it will do
75 so. Also note that Script with a method of <code>GET</code>
76 will only be called if there are query arguments present
77 (<em>e.g.</em>, foo.html?hi). Otherwise, the request will
80 <blockquote><table cellpadding="10"><tr><td bgcolor="#eeeeee"><p align="center"><strong>Examples</strong></p><code>
82 # For <ISINDEX>-style searching<br>
83 Script GET /cgi-bin/search<br>
84 # A CGI PUT handler<br>
85 Script PUT /~bob/put.cgi<br>
86 </code></td></tr></table></blockquote>
87 <hr></blockquote><h3 align="center">Apache HTTP Server Version 2.0</h3><a href="./"><img src="../images/index.gif" alt="Index"></a><a href="../"><img src="../images/home.gif" alt="Home"></a></body></html>