mirror of
https://github.com/apache/httpd.git
synced 2025-05-17 15:21:13 +03:00
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86320 13f79535-47bb-0310-9956-ffa450edef68
141 lines
3.6 KiB
HTML
141 lines
3.6 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
|
<HTML>
|
|
<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>
|
|
|
|
<P><A
|
|
HREF="module-dict.html#Status"
|
|
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 NAME="action">Action directive</A></H2>
|
|
<P>
|
|
<A
|
|
HREF="directive-dict.html#Syntax"
|
|
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 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
|
|
</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 (<EM>e.g.</EM>, foo.html?hi). Otherwise, the request
|
|
will proceed normally.
|
|
</P>
|
|
<P>
|
|
Examples:
|
|
</P>
|
|
<PRE>
|
|
# For <ISINDEX>-style searching
|
|
Script GET /cgi-bin/search
|
|
# A CGI PUT handler
|
|
Script PUT /~bob/put.cgi
|
|
</PRE>
|
|
|
|
<!--#include virtual="footer.html" -->
|
|
</BODY>
|
|
</HTML>
|