Serving Office 2007 documents to IE Users with Apache

I encountered an issue downloading Office 2007 documents with IE. When downloaded IE would download them as ZIP files instead.

In reality, these are zip files. Our users need them to open in the correct application.

The solution was adding the new mime types to apache.
I was unaware that apache provides mime type info for each file served or that IE actually used that information.

Adding the following my apache config fixed the problem:

1
2
3
4
5
    #Types for the new office documents
    AddType application/vnd.openxmlformats-officedocument.wordprocessingml.document .docx
    AddType application/vnd.openxmlformats-officedocument.presentationml.presentation .pptx
    AddType application/vnd.openxmlformats-officedocument.spreadsheetml.sheet .xlsx
    AddType application/vnd.ms-xpsdocument .xps

References:
http://blogs.msdn.com/dmahugh/archive/2006/08/08/692600.aspx
http://httpd.apache.org/docs/2.2/mod/mod_mime.html#addtype

 

derak

 

Leave a Reply

Your email address will not be published. Required fields are marked *