Prevent IE from Changing .apk, .xap and .ipa Extensions to .zip (Apache)

In Internet Explorer .apk, .xap and .ipa extensions are removed and replaced with .zip instead. 

The Fix

Using Apache 2.4 on Ubuntu 14.04.

$ apachectl -v
Server version: Apache/2.4.7 (Ubuntu)
Server built:   Jul 22 2014 14:36:38

Add the following files to /etc/mime.conf:

# Android
application/vnd.android.package-archive         apk
# Windows phone
application/x-silverlight-app                   xap
# iPhone
application/octet-stream                        ipa

Enable Apache headers module:

# a2enmod headers

Add the following lines the site’s configuration file:

<Files *.ipa>
 Header set Content-Disposition attachment
</Files>

Restart Apache service.

# service apache2 restart