<p>This directive adds an action, which will activate
<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
<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>
<p>In the first example, requests for files with a MIME content
type of <code>image/gif</code> will instead be handled by the
<p>This directive adds an action, which will activate
<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#scriptalias">ScriptAlias</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">
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
effects.
</div>
<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
(<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 />
<br />
# A CGI PUT handler<br />
Script PUT /~bob/put.cgi<br />
</code></p></div>
</div>
</div>
<div class="bottomlang">
<p><span>Available Languages: </span><a href="../en/mod/mod_actions.html" title="English"> en </a> |
<a href="../ja/mod/mod_actions.html" hreflang="ja" rel="alternate" title="Japanese"> ja </a> |
<a href="../ko/mod/mod_actions.html" hreflang="ko" rel="alternate" title="Korean"> ko </a></p>
</div><div id="footer">
<p class="apache">Copyright 1999-2004 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>