好友团

24小时服务电话

134-2860-6060

查看: 870|回复: 0

[综合教程] IIS添加MIME扩展类型及常用的MIME类型列表

[复制链接]
发表于 2017-4-9 16:28:30 | 显示全部楼层 |阅读模式
填写您的邮件地址,订阅我们的精彩内容:
[受理编号:SL-2411]
填写您的邮件地址,订阅我们的精彩内容:

经常我在用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/扩展名

扩展名类型/子类型

  1. PSE: collapse; FONT-FAMILY: Arial, Helvetica, sans-serif; COLOR: #000000; FONT-SIZE: 12px; BORDER-TOP: #888888 1px solid; BORDER-RIGHT: #888888 1px solid" class="dataintable" border="0">
复制代码


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


乱码查看器

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
回复
〖销售站〗一站式品质服务平台. 一体化商城系统.【www.xiaoshouzhan.com】
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

销售站-一体化商城系统!
 
 
Q Q|技术部
销售|销售部
客服|销售站实体店
分流|销售站实体店
视频解析群:
好记吧
产品售后群:
站长源码(交易平台)
域名拍卖群:
域名拍卖群
产品维权群:
藤县站
微信客服中心:
/images/niwota00000000300.jpg
工作时间:
8:00-18:00
 
版权所有:好友团

QQ|关于我们|手机版|( 桂ICP备19008987号|网站地图  | Sponsor: Friends group