字体库文件404解决方案
场景:明明iis中的字体文件存在,访问却出现404,登录服务器访问,依旧404,不过多了个提示,添加mime映射。恍然大悟。原来IIS默认不识别字体库文件。参考方案,在config文件中添加映射配置
1 <system.webServer> 2 <staticContent> 3 <remove fileExtension=".woff"/> 4 <mimeMap fileExtension=".woff" mimeType="application/x-font-woff" /> 5 <remove fileExtension=".woff2"/> 6 <mimeMap fileExtension=".woff2" mimeType="application/x-font-woff2" /> 7 <remove fileExtension=".ttf" /> 8 <mimeMap fileExtension=".ttf" mimeType="application/x-font-truetype" /> 9 <remove fileExtension=".svg" /> 10 <mimeMap fileExtension=".svg" mimeType="image/svg+xml" /> 11 <remove fileExtension=".otf" /> 12 <mimeMap fileExtension=".otf" mimeType="application/x-font-opentype" /> 13 <remove fileExtension=".eot" /> 14 <mimeMap fileExtension=".eot" mimeType="application/vnd.ms-fontobject" /> 15 </staticContent> 16 </system.webServer>
不会飞的鱼~~~~梦想总要有的,万一实现了呢!
尊重他人劳动成功。转载请注明出处! http://www.cnblogs.com/flyfishing/
尊重他人劳动成功。转载请注明出处! http://www.cnblogs.com/flyfishing/