Bootstrap,Font Awesome等组件中 .woff字体报404错的解决办法

时间:2023-03-09 19:03:04
Bootstrap,Font Awesome等组件中 .woff字体报404错的解决办法

参考资料:http://www.zhidao91.com/glyphicons-halflings-regular-woff-404-not-found/

http://shiyousan.com/post/635398568799806827#m1

http://shiyousan.com/post/635425285325763892

是因为IIS不支持这种文件的访问,这样修改网站根目录下的web.config添加如下代码即可

Bootstrap,Font Awesome等组件中 .woff字体报404错的解决办法

 <staticContent>
     <remove fileExtension=".woff"/>
     <mimeMap fileExtension=".woff" mimeType="application/font-woff" />
 </staticContent>

.woff2等文件也是类似