The mod_mime module contains directives that help to organize various MIME types on the server.
AddCharset | AddCharset character_set extensions ... |
[server config, or within <VirtualHost> or <Directory>, or .htaccess] |
AddEncoding |
AddEncoding encoding extension ...
[server config, or within <VirtualHost> or <Directory>, or .htaccess]
Allows you to specify which MIME encodings should be associated with documents from your server. Encodings beginning with x- are used for unofficial encodings. For example:
AddEncoding x-gzip gz
AddHandler |
AddHandler handler-name extension ...
[server config, or within <VirtualHost> or <Directory>, or .htaccess]
Maps one or more filename extensions to a specific handler for the server. For example, for CGI scripts, you might use the following:
AddHandler cgi-script cgi
AddLanguage |
AddLanguage mime-lang extension ...
[server config, or within <VirtualHost> or <Directory>, or .htaccess]
Specifies that a certain extension should be associated with a specific language for purposes of content negotiation. For example, to associate the extension .francais with French documents, use the following setting:
AddLanguage fr .francais
AddType |
AddType mime-type extension ...
[server config, or within <VirtualHost> or <Directory>, or .htaccess]
Specifies a MIME type and subtype to be associated with certain file extensions. For example, if you want to serve a Microsoft Word document:
AddType application/msword .doc
AddType directives overrides any extension-to-type mappings in your mime.types file.
DefaultLanguage |
DefaultLanguage language
[server config, or within <VirtualHost> or <Directory>, or .htaccess]
Specifies the default language for any files that are not associated with a particular language via AddLanguage.
ForceType |
ForceType mime_type
[Within <Directory>, or .htaccess]
Specifies that all files in this directory should be served with the specified type. Appropriate for inclusion in .htaccess files or within <Directory> section directives.
RemoveEncoding | RemoveEncoding extensions ... |
[Within <Directory>, or .htaccess]
Removes any associated encodinges for files matching the specified extensions.
RemoveHandler | RemoveHandler extensions ... |
[Within <Directory>, or .htaccess]
Removes any associated handlers for files matching the specified extensions.
RemoveType | RemoveType extensions ... |
[Within <Directory>, or .htaccess]
Removes any associated MIME types for files matching the specified extensions.
SetHandler |
SetHandler handler
[Within <Directory>, or .htaccess]
Specifies that all files in the directory should be passed through the specified handler. Values are:
TypesConfig |
TypesConfig filename
[server config]
Specifies the location of the MIME types file. As with other configuration paths, the location may be given as either an absolute path or a relative path to the ServerRoot directory. The default is:
TypesConfig conf/mime.types
Copyright © 2003 O'Reilly & Associates. All rights reserved.