我在以下项目上在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
的自定义主题。在主题中,字体很棒通过以下方式引用:
<resource>
<content-type>text/css</content-type>
<href>https://maxcdn.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css</href>
</resource>
以下链接描述了类似的问题,但我不确定如何解决我的特定情况:
- 在xpages中使用图标字体
- 'NetworkError:404找不到fontawesome-webfont.woff?v = 4.0.3
问题是扩展Bootstrap3_flat
主题。我将其更改为扩展Bootstrap3_blank
。请参阅此处的IBM文章:https://wiki.openntf.org/display/extlib/how the use the bootstrap3_blank.theme in in in in
我还需要复制 dbootstrap.css
文件并自定义以删除引用到webfont.woff和webfont.tff文件。
我这样做后404个错误消失了。
我的fontawesome字体在2015年的VisualStudio中效果很好。在发布给我的第三方Weberver后,找不到字体(404错误)。我无法解释为什么VS2015奏效了,但这是我的解决方案:Fontawesome字体出版后〜/content/fonts/fontawesome出版后,但是它们需要使用〜/fonts/,所以我只是在那里复制它们,问题解决了。在WebBrowser上使用F12显示了404错误,并显示了浏览器寻找.Woff和.ttf字体的位置。