2N/A<!
DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
2N/A<
TITLE>Module mod_actions</
TITLE>
2N/A<!-- Background white, links blue (unvisited), navy (visited), red (active) --> 2N/A<
H1 ALIGN="CENTER">Module mod_actions</
H1>
2N/Ais compiled in by default. It provides for
2N/Aexecuting CGI scripts based on media type or request method. It is not
2N/Apresent in versions prior to Apache 1.1.
2N/AThis module lets you run CGI scripts whenever a file of a certain type
2N/Ais requested. This makes it much easier to execute scripts that
2N/A<
LI><
A HREF="#action">Action</
A>
<
LI><
A HREF="#script">Script</
A>
<
H2><
A name="action">Action directive</
A></
H2>
><
STRONG>Syntax:</
STRONG></
A> Action <
EM>mime-type cgi-script</
EM><
BR>
><
STRONG>Context:</
STRONG></
A> server config, virtual host, directory, .htaccess<
BR>
><
STRONG>Override:</
STRONG></
A> FileInfo<
BR>
><
STRONG>Status:</
STRONG></
A> Base<
BR>
><
STRONG>Module:</
STRONG></
A> mod_actions<
BR>
><
STRONG>Compatibility:</
STRONG></
A> Action is only available in Apache 1.1
This directive adds an action, which will activate <
EM>cgi-script</
EM> when
a file of content type <
EM>mime-type</
EM> is requested. It sends the
URL and file path of the requested document using the standard
CGI PATH_INFO and PATH_TRANSLATED environment variables.
<
H2><
A name="script">Script directive</
A></
H2>
><
STRONG>Syntax:</
STRONG></
A> Script <
EM>method cgi-script</
EM><
BR>
><
STRONG>Context:</
STRONG></
A> server config, virtual host, directory<
BR>
><
STRONG>Status:</
STRONG></
A> Base<
BR>
><
STRONG>Module:</
STRONG></
A> mod_actions<
BR>
><
STRONG>Compatibility:</
STRONG></
A> Script is only available in Apache 1.1
This directive adds an action, which will activate <
EM>cgi-script</
EM> when
a file is requested using the method of <
EM>method</
EM>, which can be
one of <
CODE>GET</
CODE>, <
CODE>POST</
CODE>, <
CODE>PUT</
CODE> or
<
CODE>DELETE</
CODE>. It sends the
URL and file path of the requested document using the standard
CGI PATH_INFO and PATH_TRANSLATED environment variables.
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 (
e.g. foo.html?hi). Otherwise, the request