Tuesday, 9 February 2010

Apache Office 2007 MIME

Apache doesn't know what the new Office file formats are, to it they are just Zip files with some XML files inside....that's because that is exactly what they are.

So if you have some links to docx pptx or xlsx files on your Apache server and they are getting opened incorrectly into Winzip or 7Zip then its time to educate Apache. Crack open the http.conf file and add the following line of code to the 'AddType' section (it should already have a couple of entries to do with .gz and .z files):

AddType application/vnd.openxmlformats .docx .pptx .xlsx


Restart the Apache services and away you go.