"NetworkError: 404 Not Found fontawesome-webfont.woff?v=4.0.3

Zeshan picture Zeshan · Jun 8, 2014 · Viewed 59.2k times · Source

I'm getting this error message whenever I load my application page. I'm using Apache. Following is my css code.

url('../fonts/fontawesome-webfont.woff?v=4.0.3') format('woff')

Firefox throws

"NetworkError: 404 Not Found url.../fonts/fontawesome-webfont.woff?v=4.0.3

While chrome says

GET url.../fonts/fontawesome-webfont.woff?v=4.0.3 404 (Not Found)

Can anyone tell me how to fix this problem? Thanks in advance.

Answer

HowieH picture HowieH · Jun 18, 2014

This worked for me: Add the following lines to your web.config

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

You have to add these lines because by default Apache is not configured with .woff as a default MIME-type. Apache default MIME-type This holds for IIS as well. As Seb Duggan explains here:IIS default MIME, by default .woff files will not be served by the server.