问题经过
在做网站开始的时候回经常使用到网页字体,于是向服务器上传了相关字体文件(后缀是.ttf),访问页面的时候字体没有显示。查看了浏览器的报错提示,显示访问不到字体文件。
经过确认,确实上传了字体.ttf文件,相关引用和写法都对了,报“HTTP 错误 404.3 - Not Found”错误。
测试其他的网页文件包括html和php等都工作正常。
反复确认,问题是IIS指定的Mine类型里没有改后缀的支持,没有添加对应的Mine类型导致了无法解析文件后缀名。
以下是IIS 10支持的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 |
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、打开IIS管理器。 找到对应的网站,单机后在右侧管理区域,双击“Mine类型”图标
2、在列表区域,右键-添加
3、填写要添加的Mine类型信息
4、在“文件扩展名”区段,填写.ttf(或者你要添加的扩展名),在MINE类型字段,填好上述列表中的扩展部分,比如ttf就填写application/rtf,然后点确认。
5、下面再试一下吧。
版权属于: 三三世界-百宝箱
本文链接: http://33f.net/setup/iis_mine.html
本文最后更新于2021年11月14日 ,已超过1132天没有更新,若内容或图片失效,请留言反馈。
本文允许转载,但请在转载时请以超链接或其它形式标明文章出处
@Doug Shume it's ok for me , you can post here.
Saved as a favorite, I like your website!
If some one wishes to be updated with hottest technologies after that he must be visit this site and be up to date daily.
Heello would you mind sharing which blog platform you're using? I'm planning to start my own blog in the near future but I'm having a tough time making a decision between BlogEngine/Wordpress/B2evolution and Drupal. The reason I ask is because your layout seems different then moost blogs and I'm looking for something completely unique. P.S Apologies forr being off-topic butt I had to ask!
Thanks to my father who shared with me regarding this webpage, this website is genuinely amazing.
Hi, I have an overflow of customers that I'd like to send to you but I want to make sure you can handle more leads, let me know if you'd like me to send you more info.
zh.us.to 有效
kms.03k.org 有效
kms.chinancce.com
kms.shuax.com 有效
kms.dwhd.org 有效
kms.luody.info 有效
kms.digiboy.ir 有效
kms.lotro.cc 有效
www.zgbs.cc 有效
cy2617.jios.org 有效
@ 权限问题,试试sudo 再加命令。
你好提示Permission denied 怎么办啊