From: Rich Bowen Date: Sat, 2 May 2026 19:40:57 +0000 (+0000) Subject: Bug 64596: Document that extensionless files cannot be matched by mod_mime; show... X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=592d5cc11d859e97e638ca91dd24454722147ffd;p=thirdparty%2Fapache%2Fhttpd.git Bug 64596: Document that extensionless files cannot be matched by mod_mime; show FilesMatch workaround git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1933715 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/docs/manual/mod/mod_mime.xml b/docs/manual/mod/mod_mime.xml index a3c58f862e..6327a28edb 100644 --- a/docs/manual/mod/mod_mime.xml +++ b/docs/manual/mod/mod_mime.xml @@ -151,6 +151,30 @@ module="mod_mime_magic">MimeMagicFile + Files with no extension +

Files with no extension (such as Makefile) cannot + be matched by mod_mime's extension-based directives. + To set the content type or charset for such files, use a + Files or + FilesMatch + section instead:

+ + +# For a specific file: +<Files "Makefile"> + ForceType text/plain + AddDefaultCharset UTF-8 +</Files> + +# For all files with no extension: +<FilesMatch "^[^.]+$"> + ForceType text/plain + AddDefaultCharset UTF-8 + AddDefaultCharset UTF-8 +</FilesMatch> + +
+
Content encoding