If you have ever faced an issue where you are trying to download any office 2007 files ( .docx, .pptx, . xlsx ) from internet explorer browser and it open as zip file then you are at a right place.
We had a same issue with on of our project recently. Actually, that was the problem with MIME type of server. I am not sure about windows IIS server but if you have server with Linux machine and Apache then this can be a trick. Here is the solution for this problem.
From Web hosting Panel or Control Panel
- Login to your Control Panel.
- Find an option to add/modify server MIME Type.
- Add this as an mime entry from your control panel.
- Mime Type : application/vnd.openxmlformats
- Extensions : docx pptx xlsx
From Command Line
- If you want to do this with command line open this file /etc/mime.types
- Add this line at the end of the file :
application/vnd.openxmlformats docx pptx xlsx - Restart your Apache server and check the problem.
Let me know if this works for you or helped you. If you have any other issues with relation to that post it in comment.