Monday, March 5, 2007

Office 2007 IIS 6 Mime Types: docx, pptx, xlsx...

I needed to add new mime-types to IIS 6 in order to allow download of new MS Office 2007 files saved with the new extensions. IIS 6 is pretty restrictive about what files it will serve, requiring manual and explicit extensions/mime-type configuration.

Adding the extension is easy:
  1. Get to the Internet Management snap-in any way you like
  2. Right click "Web Sites" and select "Properties" to modify the global behavior, or any specific website to edit just that one
  3. Select "HTTP Headers"
  4. Select "Mime Types"
  5. Enter a new extension (no leading period is required) and the appropriate mime type. Repeat as needed for each extension.
  6. Click "OK" to close all the dialogs
The hard part is knowing what to use for the mime-type. Luckily, this blog post had a link to this page where lot's of mime-types are defined.

No comments: