Frequently Asked Questions


Questions about Services and Scripts

Can I make my file's Content-Type not text/plain?

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

As another example, here is a list of MIME types for chemistry-related information used with the Chime software.

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.

Also, please note that as of the current time (3 November 1999) any directory that has a .htaccess file with an AddType line will not be accessible via web.mit.edu. Anyone using an http://web.mit.edu URL to access that web directory will get an "Internal Server Error" error message. This means that, at present, you will need to advertise your web directory using an http://www.mit.edu URL. However, this arrangement is subject to change and there is no long-term guarantee that creating a .htaccess file (as described above) will be useful.


Return to Frequently Asked Questions.
[www.mit.edu home page] [personal home pages] [activities and clubs] [gateways and services] [local content] [help resources]
webmaster@mit.edu