找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 4524|回复: 2

[分享] IIS添加MIME扩展类型及常用的MIME类型列表

[复制链接]
发表于 2016-8-20 15:13:36 | 显示全部楼层 |阅读模式 来自 中国–河南
经常用IIS作为下载服务器的时候有时传上去的文件比如 example.mp4 文件名上传后,但是用http打开的时候确显示为 404 文件不存在。其实是IIS对文件的一种保护,不在IIS指定的MIME类型里的文件不会被操作。
  常见的有 mp4 / flv / iso / 7z / apk 等扩展名的文件, iis 本身是没有指定MIME类型的,这类文件默认在IIS里是不能下载的,如确需下载,则需手动添加对应的 MIME 类型。
方法如下:
1. 打开IIS,在右侧找到 MIME类型
1.webp
比如我们需要IIS支持 MP4 文件下载可以这么设置:(这里我们对IIS全局进行设置、如果只针对某一个站点可以直接设置站点的)
2. 选中指定网站→在右侧找到 MIME类型 → 双击进入已有类型页 → 点击最右侧添加
2.webp
3. 在弹出的 MIME类型框上 扩展名 MP4 MIME类型为: application/octet-stream
3.webp
  这样IIS就可以支持 MP4下载了。
下面列出一些常用的 扩展名的 MIME类型。
如果不知道MIME类型 可以写通用的: application/octet-stream
还有一些规律如果是文本类的让IE可以直接打开的 MIME 可以为 text/扩展名
如果是音频打开的时候让windows自动播放的可以用 audio/扩展名

扩展名类型/子类型


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


发帖求助前要善用【论坛搜索】功能,那里可能会有你要找的答案;

如何回报帮助你解决问题的坛友,好办法就是点击帖子下方的评分按钮给对方加【金币】不会扣除自己的积分,做一个热心并受欢迎的人!

发表于 2016-9-14 17:18:25 | 显示全部楼层 来自 中国–山东–青岛
支持楼主

发帖求助前要善用【论坛搜索】功能,那里可能会有你要找的答案;

如何回报帮助你解决问题的坛友,好办法就是点击帖子下方的评分按钮给对方加【金币】不会扣除自己的积分,做一个热心并受欢迎的人!

回复

使用道具 举报

发表于 2016-11-9 20:55:05 | 显示全部楼层 来自 中国–湖北–武汉
bvbfvgfdf vfdbgcv

发帖求助前要善用【论坛搜索】功能,那里可能会有你要找的答案;

如何回报帮助你解决问题的坛友,好办法就是点击帖子下方的评分按钮给对方加【金币】不会扣除自己的积分,做一个热心并受欢迎的人!

回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则 需要先绑定手机号

关闭

站长推荐上一条 /1 下一条

QQ|侵权投诉|广告报价|手机版|小黑屋|西部数码代理|飘仙建站论坛 ( 豫ICP备2022021143号-1 )

GMT+8, 2024-12-23 09:56 , Processed in 0.059222 second(s), 8 queries , Redis On.

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表