虚拟主机域名注册-常见问题VPS/云主机问题 → vps/云主机


IIS添加MIME扩展类型及常用的MIME类型列表
作者:虚机屋网络(www.xujiwu.com)

        经常我在用IIS做为下载服务器的时候有时传上去的文件比如 xxx.iso 文件名名是传上去了,但是用http打开的时候确显示为 404 文件不存在。

        这其实是IIS对文件的一种保护,不在IIS指定的MIME类型里的文件显不会操作。

        觉见的有 mp4 / flv / iso / 7z / apk 等扩展名的文件 iis 本身是没有指定MIME类型的,这类文件默认在IIS里是不能下载的。

         我们可以打开IIS 在 xx本地服务器上 右键 -> 属性 然后在 MIME类型 中查看已经的MIME格式

        

        比如我们需要IIS支持 MP4 文件下载可以这么设置:(这里我们对IIS全局进行设置、如果只针对某一个站点可以直接设置站点的)

        1、在 网站 上右键 选属性

        

        2、在打开的 网站 属性 上选择 HTTP 头 再点 MIME类型按钮

        

        3、在打开的窗本中 点下 新建

        

        4、在弹出的 MIME类型框上 扩展名 MP4 MIME类型为: application/octet-stream

         

        这样IIS就可以支持 MP4下载了。

        下面列出一些常用的 扩展名的 MIME类型。

        如果不知道MIME类型 可以写通用的: application/octet-stream

        还有一些规律如果是文本类的让IE可以直接打开的 MIME 可以为 text/扩展名

        如果是音频打开的时候让windows自动播放的可以用 audio/扩展名

        

        扩展名类型/子类型




application/octet-stream
323text/h323
acxapplication/internet-property-stream
aiapplication/postscript
aifaudio/x-aiff
aifcaudio/x-aiff
aiffaudio/x-aiff
asfvideo/x-ms-asf
asrvideo/x-ms-asf
asxvideo/x-ms-asf
auaudio/basic
avivideo/x-msvideo
axsapplication/olescript
bastext/plain
bcpioapplication/x-bcpio
binapplication/octet-stream
bmpimage/bmp
ctext/plain
catapplication/vnd.ms-pkiseccat
cdfapplication/x-cdf
cerapplication/x-x509-ca-cert
classapplication/octet-stream
clpapplication/x-msclip
cmximage/x-cmx
codimage/cis-cod
cpioapplication/x-cpio
crdapplication/x-mscardfile
crlapplication/pkix-crl
crtapplication/x-x509-ca-cert
cshapplication/x-csh
csstext/css
dcrapplication/x-director
derapplication/x-x509-ca-cert
dirapplication/x-director
dllapplication/x-msdownload
dmsapplication/octet-stream
docapplication/msword
dotapplication/msword
dviapplication/x-dvi
dxrapplication/x-director
epsapplication/postscript
etxtext/x-setext
evyapplication/envoy
exeapplication/octet-stream
fifapplication/fractals
flrx-world/x-vrml
gifimage/gif
gtarapplication/x-gtar
gzapplication/x-gzip
htext/plain
hdfapplication/x-hdf
hlpapplication/winhlp
hqxapplication/mac-binhex40
htaapplication/hta
htctext/x-component
htmtext/html
htmltext/html
htttext/webviewhtml
icoimage/x-icon
iefimage/ief
iiiapplication/x-iphone
insapplication/x-internet-signup
ispapplication/x-internet-signup
jfifimage/pipeg
jpeimage/jpeg
jpegimage/jpeg
jpgimage/jpeg
jsapplication/x-javascript
latexapplication/x-latex
lhaapplication/octet-stream
lsfvideo/x-la-asf
lsxvideo/x-la-asf
lzhapplication/octet-stream
m13application/x-msmediaview
m14application/x-msmediaview
m3uaudio/x-mpegurl
manapplication/x-troff-man
mdbapplication/x-msaccess
meapplication/x-troff-me
mhtmessage/rfc822
mhtmlmessage/rfc822
midaudio/mid
mnyapplication/x-msmoney
movvideo/Quicktime
movievideo/x-sgi-movie
mp2video/mpeg
mp3audio/mpeg
mpavideo/mpeg
mpevideo/mpeg
mpegvideo/mpeg
mpgvideo/mpeg
mppapplication/vnd.ms-project
mpv2video/mpeg
msapplication/x-troff-ms
mvbapplication/x-msmediaview
nwsmessage/rfc822
odaapplication/oda
p10application/pkcs10
p12application/x-pkcs12
p7bapplication/x-pkcs7-certificates
p7capplication/x-pkcs7-mime
p7mapplication/x-pkcs7-mime
p7rapplication/x-pkcs7-certreqresp
p7sapplication/x-pkcs7-signature
pbmimage/x-portable-bitmap
pdfapplication/pdf
pfxapplication/x-pkcs12
pgmimage/x-portable-graymap
pkoapplication/ynd.ms-pkipko
pmaapplication/x-perfmon
pmcapplication/x-perfmon
pmlapplication/x-perfmon
pmrapplication/x-perfmon
pmwapplication/x-perfmon
pnmimage/x-portable-anymap
pot,application/vnd.ms-powerpoint
ppmimage/x-portable-pixmap
ppsapplication/vnd.ms-powerpoint
pptapplication/vnd.ms-powerpoint
prfapplication/pics-rules
psapplication/postscript
pubapplication/x-mspublisher
qtvideo/quicktime
raaudio/x-pn-realaudio
ramaudio/x-pn-realaudio
rasimage/x-cmu-raster
rgbimage/x-rgb
rmiaudio/mid
roffapplication/x-troff
rtfapplication/rtf
rtxtext/richtext
scdapplication/x-msschedule
scttext/scriptlet
setpayapplication/set-payment-initiation
setregapplication/set-registration-initiation
shapplication/x-sh
sharapplication/x-shar
sitapplication/x-stuffit
sndaudio/basic
spcapplication/x-pkcs7-certificates
splapplication/futuresplash
srcapplication/x-wais-source
sstapplication/vnd.ms-pkicertstore
stlapplication/vnd.ms-pkistl
stmtext/html
svgimage/svg+xml
sv4cpioapplication/x-sv4cpio
sv4crcapplication/x-sv4crc
swfapplication/x-shockwave-flash
tapplication/x-troff
tarapplication/x-tar
tclapplication/x-tcl
texapplication/x-tex
texiapplication/x-texinfo
texinfoapplication/x-texinfo
tgzapplication/x-compressed
tifimage/tiff
tiffimage/tiff
trapplication/x-troff
trmapplication/x-msterminal
tsvtext/tab-separated-values
txttext/plain

再添几个常用的

apk    application/vnd.android.package-archive

MRP文件(国内普遍的手机)

.mrp application/octet-stream

IPA文件(IPHONE)

.ipa application/iphone-package-archive

.deb application/x-debian-package-archive

APK文件(安卓系统)

.apk application/vnd.android.package-archive

CAB文件(Windows Mobile)

.cab application/vnd.cab-com-archive

XAP文件(Windows Phone 7)

.xap application/x-silverlight-app

SIS文件(symbian平台/S60V1)

.sis application/vnd.symbian.install-archive *(下有)

SISX文件(symbian平台/S60V3/V5)

.sisx application/vnd.symbian.epoc/x-sisx-app




来源:
阅读:3413
日期:2014-11-22

【 双击滚屏 】 【 推荐朋友 】 【 收藏 】 【 打印 】 【 关闭 】 【 字体: 】 
上一篇:已经没有了。
下一篇:织梦dedecms程序安全设置
  >> 相关文章