加载资源失败:服务器响应的状态为404 ()font-awesome



我使用jsf和adminlte主题。我对图标有问题

my CSS part:

<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700&amp;display=fallback"/>
<h:outputStylesheet library="plugins/fontawesome-free/css" name="all.min.css" />
<h:outputStylesheet library="dist/css" name="adminlte.min.css" />

我的js部分:

<h:outputScript library="plugins/jquery" name="jquery.min.js"/>
<h:outputScript library="plugins/bootstrap/js" name="bootstrap.bundle.min.js"/>
<h:outputScript library="dist/js" name="adminlte.min.js"/>

这是控制台错误

fa-solid-900.woff2:1 Failed to load resource: the server responded with a status of 404 ()
fa-regular-400.woff2:1 Failed to load resource: the server responded with a status of 404 ()
fa-solid-900.woff:1 Failed to load resource: the server responded with a status of 404 () 
fa-regular-400.woff:1 Failed to load resource: the server responded with a status of 404 () 
fa-solid-900.ttf:1 Failed to load resource: the server responded with a status of 404 ()
fa-regular-400.ttf:1 Failed to load resource: the server responded with a status of 404 ()

是我从控制台获得的失败的数据路径http://localhost: 8080/WebApplication1/脸/模板/tryout.xhtml #

我看不出问题所在。试图改变所有的。min.cs的内部像…/webfonts→/webfonts

请确保您在web服务器中为WOFF字体设置了正确的MIME类型。

网络。配置(IIS):

<configuration>
<system.webServer>
<staticContent>
<mimeMap fileExtension=".woff" mimeType="font/woff" />
<mimeMap fileExtension=".woff2" mimeType="font/woff2" />
</staticContent>
</system.webServer>
</configuration>

。htaccess (Apache):

AddType font/woff .woff
AddType font/woff2 .woff2