Our web server has the line
DefaultType text/plain
in its srm.conf file, meaning that HTTP responses from our web server will include the line
Content-Type: text/plain
unless the filename ends with a set of letters that are configured to do something different.
text/plain
is called a "MIME type".
For example, filenames ending in .html
or .htm
have the
MIME type text/html
and filenames ending in .gif
have the MIME type
image/gif
.
You may, however, want to override these default type settings for your
own web directory. To do this, create a file named .htaccess
in that directory. In that file, on each line have as the first field
the string AddType, as the second field the MIME type, and as the third and subsequent fields
a list of all filename endings that should be assigned that MIME type. For example,
AddType application/x-alphabetic abc abcd
AddType text/enriched txte
One type setting that some people find useful is
AddType application/msword doc
You should, however, keep in mind that in some circumstances there are risks (including those from Word Macro viruses) in automatically loading Word files obtained from untrusted web sites.
If you believe that our server ought to be changed to add a new default association between a certain filename ending and a corresponding MIME type (i.e., if you believe that this is the correct MIME type for that filename ending for essentially every user of the Athena environment), then please send mail to webmaster@mit.edu to let us know. (Note that some Athena filesystems have files in plain-text format with filenames ending in ".doc", so it is problematic to globally associate ".doc" with Word files.)
Incidentally, web.mit.edu supports a configuration file similar to .htaccess, but the name .htaccess.mit is used instead. You should typically not, however, place AddType lines into .htaccess.mit files -- if you do so, client users who access that web directory will receive an "Internal Server Error" error message.