Resolving the IE8 and docx file problem

Charles Roth, 11/27/2009       (TechBlog top)

I. The Problem
IE8 users may find that when they try to download the new(er) Microsoft Office files (such as .docx files) from a web site, that the file gets downloaded instead as a .zip file.

Oh, the irony!

II. The Solution
For unix-based web servers (at least), the solution is simple.  Just add the following entries to the /etc/mime.types file.  (I like to put them right after the entry for .zip, although in theory the actual location shouldn't matter.)

application/vnd.ms-word.document.macroEnabled.12 docm
application/vnd.openxmlformats-officedocument.wordprocessingml.document docx
application/vnd.openxmlformats-officedocument.wordprocessingml.template dotx
application/vnd.ms-powerpoint.template.macroEnabled.12 potm
application/vnd.openxmlformats-officedocument.presentationml.template potx
application/vnd.ms-powerpoint.addin.macroEnabled.12 ppam
application/vnd.ms-powerpoint.slideshow.macroEnabled.12 ppsm
application/vnd.openxmlformats-officedocument.presentationml.slideshow ppsx
application/vnd.ms-powerpoint.presentation.macroEnabled.12 pptm
application/vnd.openxmlformats-officedocument.presentationml.presentation pptx
application/vnd.ms-excel.addin.macroEnabled.12 xlam
application/vnd.ms-excel.sheet.binary.macroEnabled.12 xlsb
application/vnd.ms-excel.sheet.macroEnabled.12 xlsm
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet xlsx
application/vnd.ms-excel.template.macroEnabled.12 xltm
application/vnd.openxmlformats-officedocument.spreadsheetml.template xltx

Then restart the webserver (i.e. httpd).