Extension Map Files

The "extension map" format is the same as that used in NCSA httpd 1.0.

Basically, a extension map is a configuration file that maps file extensions to MIME types. An example would be mapping file extension ".gif" to MIME type image/gif.

Here is an example extension map file:


application/postscript         ai eps ps       
application/rtf                rtf             
application/slate                              
application/x-tex              tex             
application/x-texinfo          texinfo texi   
application/x-troff            t tr roff       
audio/basic                    au snd          
audio/x-aiff                   aif aiff aifc
audio/x-wav                    wav             
image/gif                      gif             
image/ief                      ief             
image/jpeg                     jpeg jpg jpe
image/tiff                     tiff tif        
image/x-xwindowdump            xwd             
text/html                      html            
text/plain                     txt             
video/mpeg                     mpeg mpg mpe    
video/quicktime                qt mov          
video/x-msvideo                avi             
video/x-sgi-movie              movie           

Note that each MIME type can be mapped to zero or more file extensions.

Note also that extension mapping is case insensitive.

Note finally that comments (lines starting with "#") are not supported until 2.0 prerelease 6, and that leading whitespace is not allowed -- the first character of the content-type should be the first character on a line.

Where Do Extension Map Files Go?

There can be a global extension map; the X resource globalExtensionMap gives the filename. The default is "/usr/local/lib/mosaic/mime.types". This is generally the location for system- or site-wide viewer configuration.

There can also be a personal extension map; the X resource personalExtensionMap gives the filename (the value of the environment variable HOME is prepended to this). The default is ".mime.types". This is generally the location for per-user configuration.

Note that Mosaic is configured to map some extensions to MIME types by default. To turn off these defaults, set the X resource useDefaultExtensionMap to false. We strongly recommend that this resource be left true; simply override as necessary.

Entries in the personal extension map take precedence over entries in the global extension map, which in turn take precedence over the built-in defaults.

Related Information

For information on how to map MIME types to external viewers and on the mailcap format, see here.

For information on file extensions mapped to MIME types by default in Mosaic 2.0pre4, see here.

For the list of MIME types recognized by default by Mosaic 2.0pre4, see here.