Font-Awesome error 404 on fonts

前端 未结 10 1963
北海茫月
北海茫月 2020-12-24 04:13

I do not know what is going on but in the browser console I can see 3 errors related to font-awesome

 GET http://www.desktop.just4bettors.mobi/fonts/fontawes         


        
相关标签:
10条回答
  • 2020-12-24 05:01

    Add the .woff to your application server mime type(e.g. iis-> mime type) as application/font-woff

    0 讨论(0)
  • 2020-12-24 05:12

    Better yet, add this section to your web.config and then those mime types will be automatically added to IIS on any server you deploy to. (The remove is to avoid a duplicate mime type error in case they are already there)

      <system.webServer>
        <staticContent>
          <remove fileExtension=".woff" />
          <mimeMap fileExtension=".woff" mimeType="application/font-woff" />
          <remove fileExtension=".woff2" />
          <mimeMap fileExtension=".woff2" mimeType="font/x-woff" />
        </staticContent>  
      </system.webServer>
    
    0 讨论(0)
  • 2020-12-24 05:13

    i had the same problem with iis. I added a new mime type with ".woff2" as file extension and "font/x-woff" as mime type and the problem solved.

    0 讨论(0)
  • 2020-12-24 05:13

    None of the above solutions worked for me except the following one. Please add this line after all 'bundles.Add' commands in your BundleConfig.cs file:

    BundleTable.EnableOptimizations = false;
    
    0 讨论(0)
提交回复
热议问题