mod_actions.html revision 25503838e438bb909e3ff880125732c7ed5e64ad
2N/A<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
2N/A<HTML>
2N/A<HEAD>
2N/A<TITLE>Module mod_actions</TITLE>
2N/A</HEAD>
2N/A
2N/A<!-- Background white, links blue (unvisited), navy (visited), red (active) -->
2N/A<BODY
2N/A BGCOLOR="#FFFFFF"
2N/A TEXT="#000000"
2N/A LINK="#0000FF"
2N/A VLINK="#000080"
2N/A ALINK="#FF0000"
2N/A>
2N/A<!--#include virtual="header.html" -->
2N/A<H1 ALIGN="CENTER">Module mod_actions</H1>
2N/A<P>
2N/AThis module is contained in the <CODE>mod_actions.c</CODE> file, and
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/A</P>
2N/A<H2>Summary</H2>
2N/A<P>
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/Aprocess files.
2N/A</P>
2N/A<H2>Directives</H2>
2N/A<UL>
2N/A<LI><A HREF="#action">Action</A>
<LI><A HREF="#script">Script</A>
</UL>
<HR>
<H2><A name="action">Action directive</A></H2>
<P>
<A
HREF="directive-dict.html#Syntax"
REL="Help"
><STRONG>Syntax:</STRONG></A> Action <EM>mime-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<BR>
<A
HREF="directive-dict.html#Compatibility"
REL="Help"
><STRONG>Compatibility:</STRONG></A> Action is only available in Apache 1.1
and later
</P>
<P>
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.
</P>
<HR>
<H2><A name="script">Script directive</A></H2>
<P>
<A
HREF="directive-dict.html#Syntax"
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<BR>
<A
HREF="directive-dict.html#Compatibility"
REL="Help"
><STRONG>Compatibility:</STRONG></A> Script is only available in Apache 1.1
and later
</P>
<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>, 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.
</P>
<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 (e.g. foo.html?hi). Otherwise, the request
will proceed normally.
</P>
<P>
Examples:
</P>
<PRE>
Script GET /cgi-bin/search #e.g. for &lt;ISINDEX&gt;-style searching
Script PUT /~bob/put.cgi
</PRE>
<!--#include virtual="footer.html" -->
</BODY>
</HTML>