向IIS10添加Mine类型

背景

在做网站开始的时候回经常使用到网页字体,于是向服务器上传了相关字体文件(后缀是.ttf),访问页面的时候字体没有显示。查看了浏览器的报错提示,显示访问不到字体文件。

很奇怪,明明上传了字体文件,相关引用和写法都对了,为什么了无法访问到呢,报“HTTP 错误 404.3 - Not Found”错误。原来是IIS指定的Mine类型里没有改后缀的支持,添加对应的Mine类型即可。


以下是支持的Mine类型

Extension Type/sub-type IIS 5.0
* application/octet-stream Yes
323 text/h323 Yes
acx application/internet-property-stream Yes
ai application/postscript Yes
aif audio/x-aiff Yes
aifc audio/x-aiff Yes
aiff audio/x-aiff Yes
asf video/x-ms-asf Yes
asr video/x-ms-asf Yes
asx video/x-ms-asf Yes
au audio/basic Yes
avi video/x-msvideo Yes
axs application/olescript Yes
bas text/plain Yes
bcpio application/x-bcpio Yes
bin application/octet-stream Yes
bmp image/bmp Yes
c text/plain Yes
cat application/vnd.ms-pkiseccat Yes
cdf application/x-cdf Yes
cer application/x-x509-ca-cert Yes
class application/octet-stream Yes
clp application/x-msclip Yes
cmx image/x-cmx Yes
cod image/cis-cod Yes
cpio application/x-cpio Yes
crd application/x-mscardfile Yes
crl application/pkix-crl Yes
crt application/x-x509-ca-cert Yes
csh application/x-csh Yes
css text/css Yes
dcr application/x-director Yes
der application/x-x509-ca-cert Yes
dir application/x-director Yes
dll application/x-msdownload Yes
dms application/octet-stream Yes
doc application/msword Yes
dot application/msword Yes
dvi application/x-dvi Yes
dxr application/x-director Yes
eps application/postscript Yes
etx text/x-setext Yes
evy application/envoy Yes
exe application/octet-stream Yes
fif application/fractals Yes
flr x-world/x-vrml Yes
gif image/gif Yes
gtar application/x-gtar Yes
gz application/x-gzip Yes
h text/plain Yes
hdf application/x-hdf Yes
hlp application/winhlp Yes
hqx application/mac-binhex40 Yes
hta application/hta Yes
htc text/x-component Yes
htm text/html Yes
html text/html Yes
htt text/webviewhtml Yes
ico image/x-icon Yes
ief image/ief Yes
iii application/x-iphone Yes
ins application/x-internet-signup Yes
isp application/x-internet-signup Yes
jfif image/pipeg Yes
jpe image/jpeg Yes
jpeg image/jpeg Yes
jpg image/jpeg Yes
js application/x-javascript Yes
latex application/x-latex Yes
lha application/octet-stream Yes
lsf video/x-la-asf Yes
lsx video/x-la-asf Yes
lzh application/octet-stream Yes
m13 application/x-msmediaview Yes
m14 application/x-msmediaview Yes
m3u audio/x-mpegurl Yes
man application/x-troff-man Yes
mdb application/x-msaccess Yes
me application/x-troff-me Yes
mht message/rfc822 Yes
mhtml message/rfc822 Yes
mid audio/mid Yes
mny application/x-msmoney Yes
mov video/quicktime Yes
movie video/x-sgi-movie Yes
mp2 video/mpeg Yes
mp3 audio/mpeg Yes
mpa video/mpeg Yes
mpe video/mpeg Yes
mpeg video/mpeg Yes
mpg video/mpeg Yes
mpp application/vnd.ms-project Yes
mpv2 video/mpeg Yes
ms application/x-troff-ms Yes
mvb application/x-msmediaview Yes
nws message/rfc822 Yes
oda application/oda Yes
p10 application/pkcs10 Yes
p12 application/x-pkcs12 Yes
p7b application/x-pkcs7-certificates Yes
p7c application/x-pkcs7-mime Yes
p7m application/x-pkcs7-mime Yes
p7r application/x-pkcs7-certreqresp Yes
p7s application/x-pkcs7-signature Yes
pbm image/x-portable-bitmap Yes
pdf application/pdf Yes
pfx application/x-pkcs12 Yes
pgm image/x-portable-graymap Yes
pko application/ynd.ms-pkipko Yes
pma application/x-perfmon Yes
pmc application/x-perfmon Yes
pml application/x-perfmon Yes
pmr application/x-perfmon Yes
pmw application/x-perfmon Yes
pnm image/x-portable-anymap Yes
pot application/vnd.ms-powerpoint Yes
ppm image/x-portable-pixmap Yes
pps application/vnd.ms-powerpoint Yes
ppt application/vnd.ms-powerpoint Yes
prf application/pics-rules Yes
ps application/postscript Yes
pub application/x-mspublisher Yes
qt video/quicktime Yes
ra audio/x-pn-realaudio Yes
ram audio/x-pn-realaudio Yes
ras image/x-cmu-raster Yes
rgb image/x-rgb Yes
rmi audio/mid Yes
roff application/x-troff Yes
rtf application/rtf Yes
rtx text/richtext Yes
scd application/x-msschedule Yes
sct text/scriptlet Yes
setpay application/set-payment-initiation Yes
setreg application/set-registration-initiation Yes
sh application/x-sh Yes
shar application/x-shar Yes
sit application/x-stuffit Yes
snd audio/basic Yes
spc application/x-pkcs7-certificates Yes
spl application/futuresplash Yes
src application/x-wais-source Yes
sst application/vnd.ms-pkicertstore Yes
stl application/vnd.ms-pkistl Yes
stm text/html Yes
sv4cpio application/x-sv4cpio Yes
sv4crc application/x-sv4crc Yes
t application/x-troff Yes
tar application/x-tar Yes
tcl application/x-tcl Yes
tex application/x-tex Yes
texi application/x-texinfo Yes
texinfo application/x-texinfo Yes
tgz application/x-compressed Yes
tif image/tiff Yes
tiff image/tiff Yes
tr application/x-troff Yes
trm application/x-msterminal Yes
tsv text/tab-separated-values Yes
txt text/plain Yes
uls text/iuls Yes
ustar application/x-ustar Yes
vcf text/x-vcard Yes
vrml x-world/x-vrml Yes
wav audio/x-wav Yes
wcm application/vnd.ms-works Yes
wdb application/vnd.ms-works Yes
wks application/vnd.ms-works Yes
wmf application/x-msmetafile Yes
wps application/vnd.ms-works Yes
wri application/x-mswrite Yes
wrl x-world/x-vrml Yes
wrz x-world/x-vrml Yes
xaf x-world/x-vrml Yes
xbm image/x-xbitmap Yes
xla application/vnd.ms-excel Yes
xlc application/vnd.ms-excel Yes
xlm application/vnd.ms-excel Yes
xls application/vnd.ms-excel Yes
xlt application/vnd.ms-excel Yes
xlw application/vnd.ms-excel Yes
xof x-world/x-vrml Yes
xpm image/x-xpixmap Yes
xwd image/x-xwindowdump Yes
z application/x-compress Yes
zip application/zip Yes

添加过程

1、双击“Mine类型”图标

向IIS10添加Mine类型_第1张图片


2、在列表区域,右键-添加

向IIS10添加Mine类型_第2张图片


3、填写要添加的Mine类型信息

向IIS10添加Mine类型_第3张图片

你可能感兴趣的:(建站)