"网络错误:404未找到fontawesome-webfont.woff?v = 4.0.3 [英] "NetworkError: 404 Not Found fontawesome-webfont.woff?v=4.0.3
问题描述
每次加载我的应用程序页面时,我都会收到此错误消息. 我正在使用Apache.以下是我的CSS代码.
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')
url('../fonts/fontawesome-webfont.woff?v=4.0.3') format('woff')
Firefox抛出
"NetworkError:找不到404网址.../fonts/fontawesome-webfont.woff?v = 4.0.3
"NetworkError: 404 Not Found url.../fonts/fontawesome-webfont.woff?v=4.0.3
Chrome会说
获取url .../fonts/fontawesome-webfont.woff?v = 4.0.3 404(未找到)
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.
推荐答案
这对我有用: 将以下行添加到您的web.config
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>
您必须添加这些行,因为默认情况下,Apache未配置.woff作为默认的MIME类型. Apache默认MIME类型 这也适用于IIS.正如Seb Duggan在此处说明的那样: IIS默认MIME ,默认情况下将不提供.woff文件.通过服务器.
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.
这篇关于"网络错误:404未找到fontawesome-webfont.woff?v = 4.0.3的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!