解决 IIS 部署网站引用 woff/woff2/svg 字体报 404 错误

一、问题

在 IIS 上部署网站,网页引用 woff 字体时,浏览器报“找不到woff、woff2字体”、“404”错误,不仅预设的字体加载不出来,还影响网页加载速度。

二、原因

IIS 默认设置情况下不识别 .WOFF、.WOFF2、.SVG 这几个后缀的文件。

三、解决方法

在 IIS 上添加(.WOFF、.WOFF2、.SVG)MIME 类型。

四、操作

1、打开 IIS,找到“MIME 类型”。

2、按顺序操作:“MIME 类型”->“添加”->添加三条:

文件扩展名 MIME 类型
.woff application/x-font-woff
.woff2 application/x-font-woff
.svg image/svg+xml

版权声明

本博客所有的原创文章,作者皆保留版权。转载必须包含本声明,保持本文完整,并以超链接形式注明作者后除和本文原始地址:https://blog.mazey.net/349.html

7 条评论

  1. reviewer
    indonesia
    2018年8月15日

    Excellent posting video youtube indonesia. I had been verifying frequently this web site and i'm empowered! Invaluable information and facts specially the shutting component 🙂 I actually manage such information a great deal. I became in search of this unique data for just a very long time. Thanks and also with chance.

    回复
  2. reviewer
    ceciliahyppolite
    2017年7月23日

    Hi there! I just wanted to ask if you ever have any problems with hackers?
    My last blog (wordpress) was hacked and I ended up losing many months
    of hard work due to no back up. Do you have any solutions to prevent hackers?

    回复
  3. reviewer
    tumblr
    2017年7月20日

    Hmm is anyone else experiencing problems with the pictures on this blog loading?
    I'm trying to figure out if its a problem on my end or if it's the blog.

    Any suggestions would be greatly appreciated.

    回复
  4. reviewer
    Jack
    2017年6月15日

    Everybody ⅼaughed trying tto imagine what sort
    of birthday celebrаtion Mary and Jօseph gave for Jesus when He
    was six. Larry puzzled, ?I gᥙessѕ he preferreѕd
    the ame sort oof toys we like.

    回复
  5. reviewer
    bitly
    2017年6月9日

    Very good article. I certainly love this site. Keep writing!

    回复
  6. reviewer
    linuxnet
    2017年6月9日

    TҺsre аre, after all, some unfavourɑble pߋits
    to freelancing. One necessary levᥱl is that in thᥱ event you woirk
    as a freelance paralegаl you wilⅼ not be eligible forr the sorts of benefits that you would
    have iin working for a regulation agency or a non-public
    attorney. Ιf you happen to reallү feel that such “perks”
    as common health insurance ɑnd other such benefits are essentiaⅼ, freelancіng is
    not going to offeг you thesᥱ benefits.

    回复
    1. reviewer
      Cherrie
      2018年7月27日

      yep

      回复

ceciliahyppolite进行回复 取消回复

您的电子邮箱地址不会被公开。