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/ docm
application/vnd.openxmlformats-officedocument.wordprocessingml.document docx
application/vnd.openxmlformats-officedocument.wordprocessingml.template dotx
application/ potm
application/vnd.openxmlformats-officedocument.presentationml.template potx
application/ ppam
application/ ppsm
application/vnd.openxmlformats-officedocument.presentationml.slideshow ppsx
application/ pptm
application/vnd.openxmlformats-officedocument.presentationml.presentation pptx
application/ xlam
application/ xlsb
application/ xlsm
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet xlsx
application/ xltm
application/vnd.openxmlformats-officedocument.spreadsheetml.template xltx

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