MIME Types for woff, ttf, svg, and eot 404ing despite being setup in IIS

前端 未结 1 903
别那么骄傲
别那么骄傲 2021-02-01 20:37

I am trying to get a font to render within a file and it is giving me the usual error of

Resource interpreted as Font but transferred with MIME type text/html:
         


        
相关标签:
1条回答
  • 2021-02-01 21:02

    For those who need answer. Below is solution. Reference http://www.alienfactory.co.uk/articles/mime-types-for-web-fonts-in-bedsheet for details.

    <remove fileExtension=".woff" />
    <remove fileExtension=".eot" />
    <remove fileExtension=".ttf" />
    <remove fileExtension=".svg" />
    
    <mimeMap fileExtension=".eot" mimeType="application/vnd.ms-fontobject" />
    <mimeMap fileExtension=".ttf" mimeType="application/font-sfnt" />
    <mimeMap fileExtension=".svg" mimeType="image/svg+xml" />
    <mimeMap fileExtension=".woff" mimeType="application/font-woff" />
    
    0 讨论(0)
提交回复
热议问题