Virtual host settings MIME type (json cannot be used, needs to be set)

Published: 2016-11-11

```html

Windows system virtual hosting is added directly in the hosting control panel.

image.png

blob.png

Linux (Apache) setup method:

Create a new text file locally, and add the MIME type corresponding to the extension in it (using .ipa and .apk as examples)

AddHandler application/iphone .ipa

AddHandler application/vnd.android.package-archive .apk

After saving, upload it to the website root directory, and rename it to .htaccess (note the dot). If there is a .htaccess file in the website directory, add it directly in .htaccess.


Programs using JSON technology need to add the JSON MIME type

Common MIME types:

File extensionMIME typeDescription
.jsonapplication/jsonLightweight dynamic script for data exchange; must be added for programs using JSON technology
.ipaapplication/iphoneApple app
.apkapplication/vnd.android.package-archiveAndroid app
 .mp4 video/mp4MP4 video
 .ttf application/octet-streamttf font
 .woff application/x-font-woffwoff font
 .woff2 application/x-font-woffwoff2 font
 .svg image/svg+xmlSVG graphic file
.flvflv/flv-flashOnline playback
.html or .htmtext/htmlHypertext Markup Language text
.rtfapplication/rtfRTF text
.gifimage/gifGIF graphic
.jpeg or .jpgimage/jpegJPEG graphic
.auaudio/basicau sound file
.mid or .midiaudio/midi or audio/x-midiMIDI music file
.ra or .ram or .rmaudio/x-pn-realaudioRealAudio music file
.mpg or .mpeg or .mp3video/mpegMPEG file
.avivideo/x-msvideoAVI file
.gzapplication/x-gzipGZIP file
.tarapplication/x-tarTAR file
.exeapplication/octet-streamDownload file type
.rmvbvideo/vnd.rn-realvideoOnline playback



```