• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

19.29. mod_mime

The mod_mime module contains directives that help to organize various MIME types on the server.

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

(All)

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

(Apache 1.1 or later)

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

(All)

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.

(All)

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.

SetHandler

SetHandler handler

[Within <Directory>, or .htaccess]

Specifies that all files in the directory should be passed through the specified handler. Values are:


cgi-script

All files treated as CGI scripts (see Chapter 12)


imap-file

All files treated as imagemap files


send-as-is

All files sent as is without additional server-supplied HTTP headers


server-info

All files sent with server configuration information


server-parsed

All files parsed as server-side includes (see Chapter 12)


type-map

All files parsed as type map files for content negotiation

(Apache 1.1 or later)

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

(All)


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint