Font Awesome webfont.woff 和 webfont.ttf 404 未找到
Font Awesome webfont.woff and webfont.ttf 404 Not Found
我在我的 XPages 应用程序中收到以下项目的 404 未找到错误:
https://my.domain.com/xsp/.ibmxspres/.extlib/responsive/dijit/dbootstrap-0.1.1/theme/dbootstrap/font/fontawesome-webfont.woff
https://my.domain.com/xsp/.ibmxspres/.extlib/responsive/dijit/dbootstrap-0.1.1/theme/dbootstrap/font/fontawesome-webfont.ttf
此 XPages 应用使用扩展 Bootstrap3_flat
的自定义主题。在主题中,Font Awesome 被引用为:
<resource>
<content-type>text/css</content-type>
<href>https://maxcdn.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css</href>
</resource>
以下链接描述了类似的问题,但我不确定具体如何解决我的具体情况:
- Use icon fonts in xpages
- "NetworkError: 404 Not Found fontawesome-webfont.woff?v=4.0.3
我的 fontawesome 字体在 VisualStudio 2015 中运行良好。发布到我的第 3 方网络服务器后,找不到字体(404 错误)。我无法解释为什么 VS2015 工作,但这里是我的解决方案:发布后 fontawesome 字体在 ~/content/fonts/fontawesome 中,但它们需要在 ~/fonts/ 中所以我只是将它们复制到那里和问题被解决了。在网络浏览器上使用 F12 显示 404 错误并显示浏览器在何处查找 .woff 和 .ttf 字体。
问题在于扩展 Bootstrap3_flat
主题。我将其更改为扩展 Bootstrap3_blank
。请在此处查看 IBM 文章:https://wiki.openntf.org/display/EXTLIB/How+to+use+the+Bootstrap3_blank.theme+in+XPages
我还需要复制 dbootstrap.css
文件并自定义它以删除对 webfont.woff 和 webfont.tff 文件的引用。
在我这样做之后,404 错误消失了。
我在我的 XPages 应用程序中收到以下项目的 404 未找到错误:
https://my.domain.com/xsp/.ibmxspres/.extlib/responsive/dijit/dbootstrap-0.1.1/theme/dbootstrap/font/fontawesome-webfont.woff
https://my.domain.com/xsp/.ibmxspres/.extlib/responsive/dijit/dbootstrap-0.1.1/theme/dbootstrap/font/fontawesome-webfont.ttf
此 XPages 应用使用扩展 Bootstrap3_flat
的自定义主题。在主题中,Font Awesome 被引用为:
<resource>
<content-type>text/css</content-type>
<href>https://maxcdn.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css</href>
</resource>
以下链接描述了类似的问题,但我不确定具体如何解决我的具体情况:
- Use icon fonts in xpages
- "NetworkError: 404 Not Found fontawesome-webfont.woff?v=4.0.3
我的 fontawesome 字体在 VisualStudio 2015 中运行良好。发布到我的第 3 方网络服务器后,找不到字体(404 错误)。我无法解释为什么 VS2015 工作,但这里是我的解决方案:发布后 fontawesome 字体在 ~/content/fonts/fontawesome 中,但它们需要在 ~/fonts/ 中所以我只是将它们复制到那里和问题被解决了。在网络浏览器上使用 F12 显示 404 错误并显示浏览器在何处查找 .woff 和 .ttf 字体。
问题在于扩展 Bootstrap3_flat
主题。我将其更改为扩展 Bootstrap3_blank
。请在此处查看 IBM 文章:https://wiki.openntf.org/display/EXTLIB/How+to+use+the+Bootstrap3_blank.theme+in+XPages
我还需要复制 dbootstrap.css
文件并自定义它以删除对 webfont.woff 和 webfont.tff 文件的引用。
在我这样做之后,404 错误消失了。