I needed to add new MIME types to Plesk running IIS 6 in order to allow download of Microsoft Office 2007 & 2010 files saved with the new office extensions (.docx, .xlsx, and .pptx). IIS 6 restricts the files it will serve by default, which is a good thing in my opinion, requiring administrators to explicitly configure support for additional MIME types.
Adding new extensions and their respective MIME types is pretty straightforward in IIS as you can verify from Microsoft here:
- Open IIS
- Right click “Web Sites” and select “Properties” to modify the global behavior (to modify a specific website right click the website instead)
- Select “HTTP Headers”
- Select “Mime Types”
- Enter the extension you wish to add and the appropriate mime type
- Repeat as needed for each extension
- Click “OK” to save your work and close all the dialogs
The tricky part is knowing the correct MIME type to use for each file extension. I had to search the Internet to find a list of MIME types I could trust and use. I chose to trust Microsoft and used the Office 2007 MIME type information here. Here are the MIME types I used:
- Microsoft Word (.docx): application/vnd.openxmlformats-officedocument.wordprocessingml.document
- Microsoft Excel (.xlsx): application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
- Microsoft PowerPoint (.pptx): application/vnd.openxmlformats-officedocument.presentationml.presentation
Don’t forget to restart IIS or at least the World Wide Web Publishing service.
Leave a ReplyWant to join the discussion?
Feel free to contribute!