You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by rb...@apache.org on 2026/05/02 19:40:57 UTC

svn commit: r1933715 - httpd/httpd/trunk/docs/manual/mod

Author: rbowen
Date: Sat May  2 19:40:57 2026
New Revision: 1933715

Log:
Bug 64596: Document that extensionless files cannot be matched by mod_mime; show FilesMatch workaround

Modified:
   httpd/httpd/trunk/docs/manual/mod/mod_mime.xml

Modified: httpd/httpd/trunk/docs/manual/mod/mod_mime.xml
==============================================================================
--- httpd/httpd/trunk/docs/manual/mod/mod_mime.xml	Sat May  2 19:33:25 2026	(r1933714)
+++ httpd/httpd/trunk/docs/manual/mod/mod_mime.xml	Sat May  2 19:40:57 2026	(r1933715)
@@ -151,6 +151,30 @@ module="mod_mime_magic">MimeMagicFile</d
     </highlight>
     </example>
 
+    <note><title>Files with no extension</title>
+    <p>Files with no extension (such as <code>Makefile</code>) cannot
+    be matched by <module>mod_mime</module>'s extension-based directives.
+    To set the content type or charset for such files, use a
+    <directive type="section" module="core">Files</directive> or
+    <directive type="section" module="core">FilesMatch</directive>
+    section instead:</p>
+
+    <highlight language="config">
+# For a specific file:
+&lt;Files "Makefile"&gt;
+    ForceType text/plain
+    AddDefaultCharset UTF-8
+&lt;/Files&gt;
+
+# For all files with no extension:
+&lt;FilesMatch "^[^.]+$"&gt;
+    ForceType text/plain
+    AddDefaultCharset UTF-8
+    AddDefaultCharset UTF-8
+&lt;/FilesMatch&gt;
+    </highlight>
+    </note>
+
 </section>
 
 <section id="contentencoding"><title>Content encoding</title>