]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Merge r575337, r575338 from trunk:
authorJoshua Slive <slive@apache.org>
Thu, 13 Sep 2007 17:45:32 +0000 (17:45 +0000)
committerJoshua Slive <slive@apache.org>
Thu, 13 Sep 2007 17:45:32 +0000 (17:45 +0000)
Be even more explicit about the multiple-extension issue.

PR: 43386

Transform to html.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@575381 13f79535-47bb-0310-9956-ffa450edef68

docs/manual/mod/mod_mime.html.en
docs/manual/mod/mod_mime.xml

index 145ae5b9258d6e4accc904477ec0f5a7afceb76f..aa34d91fb7193781827a03d468ea91a64108ab95 100644 (file)
     file <code>welcome.html.fr</code> maps onto content type
     <code>text/html</code> and language French then the file
     <code>welcome.fr.html</code> will map onto exactly the same
-    information.  If more than one extension is given which maps onto
+    information.  If more than one extension is given that maps onto
     the same type of meta-information, then the one to the right will
     be used, except for languages and content encodings. For example,
     if <code>.gif</code> maps to the <a class="glossarylink" href="../glossary.html#mime-type" title="see glossary">MIME-type</a>
 
     <p>Care should be taken when a file with multiple extensions
     gets associated with both a <a class="glossarylink" href="../glossary.html#mime-type" title="see glossary">MIME-type</a> and a handler. This will
-    usually result in the request being by the module associated
+    usually result in the request being handled by the module associated
     with the handler. For example, if the <code>.imap</code>
     extension is mapped to the handler <code>imap-file</code> (from
     <code class="module"><a href="../mod/mod_imagemap.html">mod_imagemap</a></code>) and the <code>.html</code> extension is
     When it is processed, the <code>imap-file</code> handler will be used,
     and so it will be treated as a <code class="module"><a href="../mod/mod_imagemap.html">mod_imagemap</a></code> imagemap
     file.</p>
+
+    <p>If you would prefer only the last dot-separated part of the
+    filename to be mapped to a particular piece of meta-data, then do
+    not use the <code>Add*</code> directives. For example, if you wish
+    to have the file <code>foo.html.cgi</code> processed as a CGI
+    script, but not the file <code>bar.cgi.html</code>, then instead
+    of using <code>AddHandler cgi-script .cgi</code>, use</p>
+
+    <div class="example"><h3>Configure handler based on final extension only</h3><p><code>
+    &lt;FilesMatch \.cgi$&gt;
+    <span class="indent">
+      SetHandler cgi-script
+    </span>
+    &lt;/FilesMatch&gt;
+    </code></p></div>
+
 </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
 <div class="section">
 <h2><a name="contentencoding" id="contentencoding">Content encoding</a></h2>
@@ -262,8 +278,11 @@ charset</td></tr>
     where the server returns one from several documents based on
     the client's charset preference.</p>
 
-    <p>The <var>extension</var> argument is case-insensitive, and can
-    be specified with or without a leading dot.</p>
+    <p>The <var>extension</var> argument is case-insensitive and can
+    be specified with or without a leading dot. Filenames may have <a href="#multipleext">multiple extensions</a> and the
+    <var>extension</var> argument will be compared against each of
+    them.</p>
+
 
 <h3>See also</h3>
 <ul>
@@ -314,8 +333,10 @@ type</td></tr>
     recent encodings, such as <code>deflate</code> should be
     specified without the <code>x-</code>.</p>
 
-    <p>The <var>extension</var> argument is case-insensitive, and can
-    be specified with or without a leading dot.</p>
+    <p>The <var>extension</var> argument is case-insensitive and can
+    be specified with or without a leading dot. Filenames may have <a href="#multipleext">multiple extensions</a> and the
+    <var>extension</var> argument will be compared against each of
+    them.</p>
 
 </div>
 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
@@ -344,8 +365,10 @@ handler</td></tr>
     <p>Once that has been put into your httpd.conf file, any file containing
     the <code>.cgi</code> extension will be treated as a CGI program.</p>
 
-    <p>The <var>extension</var> argument is case-insensitive, and can
-    be specified with or without a leading dot.</p>
+    <p>The <var>extension</var> argument is case-insensitive and can
+    be specified with or without a leading dot. Filenames may have <a href="#multipleext">multiple extensions</a> and the
+    <var>extension</var> argument will be compared against each of
+    them.</p>
 
 <h3>See also</h3>
 <ul>
@@ -374,11 +397,15 @@ later.</td></tr>
     directive. This mapping is merged over any already in force, overriding
     any mappings that already exist for the same <var>extension</var>.</p>
 
-    <p>If more than one filter is specified, they must be separated
+    <p>If more than one <var>filter</var> is specified, they must be separated
     by semicolons in the order in which they should process the
-    content. Both the filter and <var>extension</var> arguments are
-    case-insensitive, and the extension may be specified with or
-    without a leading dot.</p>
+    content. The <var>filter</var> is case-insensitive.</p>
+
+    <p>The <var>extension</var> argument is case-insensitive and can
+    be specified with or without a leading dot. Filenames may have <a href="#multipleext">multiple extensions</a> and the
+    <var>extension</var> argument will be compared against each of
+    them.</p>
+
 
 <h3>See also</h3>
 <ul>
@@ -433,8 +460,10 @@ language</td></tr>
     <p>documents with the extension <code>.en</code> would be treated as
     being <code>en-us</code>.</p>
 
-    <p>The <var>extension</var> argument is case-insensitive, and can
-    be specified with or without a leading dot.</p>
+    <p>The <var>extension</var> argument is case-insensitive and can
+    be specified with or without a leading dot. Filenames may have <a href="#multipleext">multiple extensions</a> and the
+    <var>extension</var> argument will be compared against each of
+    them.</p>
 
 <h3>See also</h3>
 <ul>
@@ -472,9 +501,12 @@ later.</td></tr>
 
     <p>If more than one filter is specified, they must be separated
     by semicolons in the order in which they should process the
-    content. Both the <var>filter</var> and <var>extension</var> arguments
-    are case-insensitive, and the extension may be specified with or
-    without a leading dot.</p>
+    content. The <var>filter</var> argument is case-insensitive.</p>
+
+    <p>The <var>extension</var> argument is case-insensitive and can
+    be specified with or without a leading dot. Filenames may have <a href="#multipleext">multiple extensions</a> and the
+    <var>extension</var> argument will be compared against each of
+    them.</p>
 
 <h3>See also</h3>
 <ul>
@@ -513,8 +545,10 @@ type</td></tr>
       <code class="directive"><a href="#typesconfig">TypesConfig</a></code> file.
     </div>
 
-    <p>The <var>extension</var> argument is case-insensitive, and can
-    be specified with or without a leading dot.</p>
+    <p>The <var>extension</var> argument is case-insensitive and can
+    be specified with or without a leading dot. Filenames may have <a href="#multipleext">multiple extensions</a> and the
+    <var>extension</var> argument will be compared against each of
+    them.</p>
 
 <h3>See also</h3>
 <ul>
@@ -673,7 +707,7 @@ later.</td></tr>
     undo any associations inherited from parent directories or the
     server config files.</p>
 
-    <p>The <var>extension</var> argument is case-insensitive, and can
+    <p>The <var>extension</var> argument is case-insensitive and can
     be specified with or without a leading dot.</p>
 
     <div class="example"><h3>Example</h3><p><code>
@@ -720,7 +754,7 @@ extensions</td></tr>
       if both occur within the same directory configuration.</p>
     </div>
 
-    <p>The <var>extension</var> argument is case-insensitive, and can
+    <p>The <var>extension</var> argument is case-insensitive and can
     be specified with or without a leading dot.</p>
 
 </div>
@@ -754,7 +788,7 @@ extensions</td></tr>
     the <code>/foo/bar</code> directory to being treated as normal
     files, rather than as candidates for parsing (see the <code class="module"><a href="../mod/mod_include.html">mod_include</a></code> module).</p>
 
-    <p>The <var>extension</var> argument is case-insensitive, and can
+    <p>The <var>extension</var> argument is case-insensitive and can
     be specified with or without a leading dot.</p>
 
 </div>
@@ -779,7 +813,7 @@ later.</td></tr>
     undo any associations inherited from parent directories or the
     server config files.</p>
 
-    <p>The <var>extension</var> argument is case-insensitive, and can
+    <p>The <var>extension</var> argument is case-insensitive and can
     be specified with or without a leading dot.</p>
 
 <h3>See also</h3>
@@ -808,7 +842,7 @@ later.</td></tr>
     any associations inherited from parent directories or the
     server config files.</p>
 
-    <p>The <var>extension</var> argument is case-insensitive, and can
+    <p>The <var>extension</var> argument is case-insensitive and can
     be specified with or without a leading dot.</p>
 
 </div>
@@ -833,7 +867,7 @@ later.</td></tr>
     undo any associations inherited from parent directories or the
     server config files.</p>
 
-    <p>The <var>extension</var> argument is case-insensitive, and can
+    <p>The <var>extension</var> argument is case-insensitive and can
     be specified with or without a leading dot.</p>
 
     <div class="example"><h3>Example</h3><p><code>
@@ -879,7 +913,7 @@ extensions</td></tr>
       latter if both occur within the same directory configuration.</p>
     </div>
 
-    <p>The <var>extension</var> argument is case-insensitive, and can
+    <p>The <var>extension</var> argument is case-insensitive and can
     be specified with or without a leading dot.</p>
 
 </div>
index daeb9fb28ea2b1c486d2c9593ed4987ab784f2b7..6f20a3bb2e7fba10ef00a5abb8a984a6735d30d4 100644 (file)
@@ -104,7 +104,7 @@ module="mod_mime_magic">MimeMagicFile</directive></seealso>
     file <code>welcome.html.fr</code> maps onto content type
     <code>text/html</code> and language French then the file
     <code>welcome.fr.html</code> will map onto exactly the same
-    information.  If more than one extension is given which maps onto
+    information.  If more than one extension is given that maps onto
     the same type of meta-information, then the one to the right will
     be used, except for languages and content encodings. For example,
     if <code>.gif</code> maps to the <glossary>MIME-type</glossary>
@@ -122,7 +122,7 @@ module="mod_mime_magic">MimeMagicFile</directive></seealso>
 
     <p>Care should be taken when a file with multiple extensions
     gets associated with both a <glossary>MIME-type</glossary> and a handler. This will
-    usually result in the request being by the module associated
+    usually result in the request being handled by the module associated
     with the handler. For example, if the <code>.imap</code>
     extension is mapped to the handler <code>imap-file</code> (from
     <module>mod_imagemap</module>) and the <code>.html</code> extension is
@@ -132,6 +132,22 @@ module="mod_mime_magic">MimeMagicFile</directive></seealso>
     When it is processed, the <code>imap-file</code> handler will be used,
     and so it will be treated as a <module>mod_imagemap</module> imagemap
     file.</p>
+
+    <p>If you would prefer only the last dot-separated part of the
+    filename to be mapped to a particular piece of meta-data, then do
+    not use the <code>Add*</code> directives. For example, if you wish
+    to have the file <code>foo.html.cgi</code> processed as a CGI
+    script, but not the file <code>bar.cgi.html</code>, then instead
+    of using <code>AddHandler cgi-script .cgi</code>, use</p>
+
+    <example><title>Configure handler based on final extension only</title>
+    &lt;FilesMatch \.cgi$&gt;
+    <indent>
+      SetHandler cgi-script
+    </indent>
+    &lt;/FilesMatch&gt;
+    </example>
+
 </section>
 
 <section id="contentencoding"><title>Content encoding</title>
@@ -260,8 +276,12 @@ charset</description>
     where the server returns one from several documents based on
     the client's charset preference.</p>
 
-    <p>The <var>extension</var> argument is case-insensitive, and can
-    be specified with or without a leading dot.</p>
+    <p>The <var>extension</var> argument is case-insensitive and can
+    be specified with or without a leading dot. Filenames may have <a
+    href="#multipleext">multiple extensions</a> and the
+    <var>extension</var> argument will be compared against each of
+    them.</p>
+
 </usage>
 <seealso><module>mod_negotiation</module></seealso>
 <seealso><directive module="core">AddDefaultCharset</directive></seealso>
@@ -309,8 +329,11 @@ type</description>
     recent encodings, such as <code>deflate</code> should be
     specified without the <code>x-</code>.</p>
 
-    <p>The <var>extension</var> argument is case-insensitive, and can
-    be specified with or without a leading dot.</p>
+    <p>The <var>extension</var> argument is case-insensitive and can
+    be specified with or without a leading dot. Filenames may have <a
+    href="#multipleext">multiple extensions</a> and the
+    <var>extension</var> argument will be compared against each of
+    them.</p>
 </usage>
 </directivesynopsis>
 
@@ -339,8 +362,11 @@ handler</description>
     <p>Once that has been put into your httpd.conf file, any file containing
     the <code>.cgi</code> extension will be treated as a CGI program.</p>
 
-    <p>The <var>extension</var> argument is case-insensitive, and can
-    be specified with or without a leading dot.</p>
+    <p>The <var>extension</var> argument is case-insensitive and can
+    be specified with or without a leading dot. Filenames may have <a
+    href="#multipleext">multiple extensions</a> and the
+    <var>extension</var> argument will be compared against each of
+    them.</p>
 </usage>
 <seealso><directive module="core">SetHandler</directive></seealso>
 </directivesynopsis>
@@ -366,11 +392,16 @@ later.</compatibility>
     directive. This mapping is merged over any already in force, overriding
     any mappings that already exist for the same <var>extension</var>.</p>
 
-    <p>If more than one filter is specified, they must be separated
+    <p>If more than one <var>filter</var> is specified, they must be separated
     by semicolons in the order in which they should process the
-    content. Both the filter and <var>extension</var> arguments are
-    case-insensitive, and the extension may be specified with or
-    without a leading dot.</p>
+    content. The <var>filter</var> is case-insensitive.</p>
+
+    <p>The <var>extension</var> argument is case-insensitive and can
+    be specified with or without a leading dot. Filenames may have <a
+    href="#multipleext">multiple extensions</a> and the
+    <var>extension</var> argument will be compared against each of
+    them.</p>
+
 </usage>
 <seealso><directive module="mod_mime">RemoveInputFilter</directive></seealso>
 <seealso><directive module="core">SetInputFilter</directive></seealso>
@@ -422,8 +453,11 @@ language</description>
     <p>documents with the extension <code>.en</code> would be treated as
     being <code>en-us</code>.</p>
 
-    <p>The <var>extension</var> argument is case-insensitive, and can
-    be specified with or without a leading dot.</p>
+    <p>The <var>extension</var> argument is case-insensitive and can
+    be specified with or without a leading dot. Filenames may have <a
+    href="#multipleext">multiple extensions</a> and the
+    <var>extension</var> argument will be compared against each of
+    them.</p>
 </usage>
 <seealso><module>mod_negotiation</module></seealso>
 </directivesynopsis>
@@ -461,9 +495,13 @@ later.</compatibility>
 
     <p>If more than one filter is specified, they must be separated
     by semicolons in the order in which they should process the
-    content. Both the <var>filter</var> and <var>extension</var> arguments
-    are case-insensitive, and the extension may be specified with or
-    without a leading dot.</p>
+    content. The <var>filter</var> argument is case-insensitive.</p>
+
+    <p>The <var>extension</var> argument is case-insensitive and can
+    be specified with or without a leading dot. Filenames may have <a
+    href="#multipleext">multiple extensions</a> and the
+    <var>extension</var> argument will be compared against each of
+    them.</p>
 </usage>
 <seealso><directive module="mod_mime">RemoveOutputFilter</directive></seealso>
 <seealso><directive module="core">SetOutputFilter</directive></seealso>
@@ -500,8 +538,11 @@ type</description>
       <directive module="mod_mime">TypesConfig</directive> file.
     </note>
 
-    <p>The <var>extension</var> argument is case-insensitive, and can
-    be specified with or without a leading dot.</p>
+    <p>The <var>extension</var> argument is case-insensitive and can
+    be specified with or without a leading dot. Filenames may have <a
+    href="#multipleext">multiple extensions</a> and the
+    <var>extension</var> argument will be compared against each of
+    them.</p>
 </usage>
 <seealso><directive module="core">DefaultType</directive></seealso>
 <seealso><directive module="core">ForceType</directive></seealso>
@@ -649,7 +690,7 @@ later.</compatibility>
     undo any associations inherited from parent directories or the
     server config files.</p>
 
-    <p>The <var>extension</var> argument is case-insensitive, and can
+    <p>The <var>extension</var> argument is case-insensitive and can
     be specified with or without a leading dot.</p>
 
     <example><title>Example</title>
@@ -696,7 +737,7 @@ extensions</description>
       if both occur within the same directory configuration.</p>
     </note>
 
-    <p>The <var>extension</var> argument is case-insensitive, and can
+    <p>The <var>extension</var> argument is case-insensitive and can
     be specified with or without a leading dot.</p>
 </usage>
 </directivesynopsis>
@@ -731,7 +772,7 @@ extensions</description>
     files, rather than as candidates for parsing (see the <module
     >mod_include</module> module).</p>
 
-    <p>The <var>extension</var> argument is case-insensitive, and can
+    <p>The <var>extension</var> argument is case-insensitive and can
     be specified with or without a leading dot.</p>
 </usage>
 </directivesynopsis>
@@ -756,7 +797,7 @@ later.</compatibility>
     undo any associations inherited from parent directories or the
     server config files.</p>
 
-    <p>The <var>extension</var> argument is case-insensitive, and can
+    <p>The <var>extension</var> argument is case-insensitive and can
     be specified with or without a leading dot.</p>
 </usage>
 <seealso><directive module="mod_mime">AddInputFilter</directive></seealso>
@@ -782,7 +823,7 @@ later.</compatibility>
     any associations inherited from parent directories or the
     server config files.</p>
 
-    <p>The <var>extension</var> argument is case-insensitive, and can
+    <p>The <var>extension</var> argument is case-insensitive and can
     be specified with or without a leading dot.</p>
 </usage>
 </directivesynopsis>
@@ -807,7 +848,7 @@ later.</compatibility>
     undo any associations inherited from parent directories or the
     server config files.</p>
 
-    <p>The <var>extension</var> argument is case-insensitive, and can
+    <p>The <var>extension</var> argument is case-insensitive and can
     be specified with or without a leading dot.</p>
 
     <example><title>Example</title>
@@ -851,7 +892,7 @@ extensions</description>
       latter if both occur within the same directory configuration.</p>
     </note>
 
-    <p>The <var>extension</var> argument is case-insensitive, and can
+    <p>The <var>extension</var> argument is case-insensitive and can
     be specified with or without a leading dot.</p>
 </usage>
 </directivesynopsis>