[Bug 64596] Mention null file extensions

[email protected]
Newsgroups gmane.comp.apache.documentation
Message-ID <[email protected]/bugzilla/>
https://bz.apache.org/bugzilla/show_bug.cgi?id=64596

Rich Bowen <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |INFORMATIONPROVIDED

--- Comment #3 from Rich Bowen <[email protected]> ---
Files with no extension (like "Makefile") cannot be matched by mod_mime's
extension-based directives (AddCharset, AddType, etc.) — there is no "null
extension" syntax.

To set the content type or charset for such files, use a <Files> section with
ForceType or AddDefaultCharset:

<Files "Makefile">
    ForceType text/plain
    AddDefaultCharset UTF-8
</Files>

Or use a <FilesMatch> for patterns:

<FilesMatch "^[^.]+$">
    ForceType text/plain
</FilesMatch>

Closing as this is by design — mod_mime is extension-based. The
<Files>/<FilesMatch> approach is the documented way to handle extensionless
files.

-- 
You are receiving this mail because:
You are the assignee for the bug.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.