]> granicus.if.org Git - apache/blobdiff - docs/manual/mod/mod_actions.xml
Merge in APR[-util] macros from branches/trunk-buildconf-noapr
[apache] / docs / manual / mod / mod_actions.xml
index 6bc130667bf0520b36e0cea279c0e10ca88a18ee..d9a9457ca39d85b3ef454d573d88619d65cd8174 100644 (file)
 
 <modulesynopsis metafile="mod_actions.xml.meta">
 
-<name>mod_actions</name> 
+<name>mod_actions</name>
 
-<description>This module provides for executing CGI scripts based on
-media type or request method.</description>
+<description>Execute CGI scripts based on media type or request method.</description>
 
 <status>Base</status>
 <sourcefile>mod_actions.c</sourcefile>
@@ -43,7 +42,7 @@ media type or request method.</description>
 
 <seealso><module>mod_cgi</module></seealso>
 <seealso><a href="../howto/cgi.html">Dynamic Content with CGI</a></seealso>
-<seealso><a href="../handler.html">Apache's Handler Use</a></seealso>
+<seealso><a href="../handler.html">Apache httpd's Handler Use</a></seealso>
 
 <directivesynopsis>
 <name>Action</name>
@@ -55,8 +54,6 @@ content-type</description>
 <context>directory</context><context>.htaccess</context>
 </contextlist>
 <override>FileInfo</override>
-<compatibility>The <code>virtual</code> modifier and handler passing were
-introduced in Apache 2.1</compatibility>
 
 <usage>
     <p>This directive adds an action, which will activate
@@ -74,23 +71,26 @@ introduced in Apache 2.1</compatibility>
     is passed using the <code>REDIRECT_HANDLER</code> variable.</p>
 
     <example><title>Example: MIME type</title>
-      # Requests for files of a particular MIME content type:<br />
-      Action image/gif /cgi-bin/images.cgi<br />
-      <br />
+    <highlight language="config">
+# Requests for files of a particular MIME content type:
+Action image/gif /cgi-bin/images.cgi
+    </highlight>
     </example>
 
     <p>In this example, requests for files with a MIME content
     type of <code>image/gif</code> will be handled by the
     specified cgi script <code>/cgi-bin/images.cgi</code>.</p>
 
-    <example><title>Example: File extension</title>
-      # Files of a particular file extension<br />
-      AddHandler my-file-type .xyz<br />
-      Action my-file-type /cgi-bin/program.cgi<br />
+    <example>
+        <title>Example: File extension</title>
+    <highlight language="config">
+# Files of a particular file extension
+AddHandler my-file-type .xyz
+Action my-file-type /cgi-bin/program.cgi
+    </highlight>
     </example>
-
     <p>In this example, requests for files with a file extension of
-    <code>.xyz</code> are handled by the specified cgi script 
+    <code>.xyz</code> are handled by the specified cgi script
     <code>/cgi-bin/program.cgi</code>.</p>
 
     <p>The optional <code>virtual</code> modifier turns off the check
@@ -98,14 +98,12 @@ introduced in Apache 2.1</compatibility>
     if you want to use the <directive>Action</directive> directive in
     virtual locations.</p>
 
-    <example><title>Example</title>
-      &lt;Location /news&gt;<br />
-      <indent>
-        SetHandler news-handler<br />
-        Action news-handler /cgi-bin/news.cgi virtual<br />
-      </indent>
-      &lt;/Location&gt;
-    </example>
+    <highlight language="config">
+&lt;Location "/news"&gt;
+    SetHandler news-handler
+    Action news-handler /cgi-bin/news.cgi virtual
+&lt;/Location&gt;
+    </highlight>
 </usage>
 
 <seealso><directive module="mod_mime">AddHandler</directive></seealso>
@@ -127,7 +125,7 @@ method.</description>
     module="mod_alias">ScriptAlias</directive> or <directive
     module="mod_mime">AddHandler</directive>.  The URL and
     file path of the requested document is sent using the standard CGI
-    <code>PATH_INFO</code> and <code>PATH_TRANSLATED</code> environment 
+    <code>PATH_INFO</code> and <code>PATH_TRANSLATED</code> environment
     variables.</p>
 
     <note>
@@ -137,21 +135,21 @@ method.</description>
       effects.
     </note>
 
-    <p>Note that the <directive>Script</directive> command defines default 
+    <p>Note that the <directive>Script</directive> 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 <directive>Script</directive> with a method of 
+    so. Also note that <directive>Script</directive> 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>
 
-    <example><title>Examples</title>
-      # For &lt;ISINDEX&gt;-style searching<br />
-      Script GET /cgi-bin/search<br />
-      <br />
-      # A CGI PUT handler<br />
-      Script PUT /~bob/put.cgi<br />
-    </example>
+    <highlight language="config">
+# All GET requests go here
+Script GET /cgi-bin/search
+
+# A CGI PUT handler
+Script PUT /~bob/put.cgi
+    </highlight>
 </usage>
 </directivesynopsis>