【发布时间】:2017-01-01 02:52:33
【问题描述】:
我们在应用程序中使用了新字体,所以我在 MimeTypes.config 文件中添加了以下内容
<mediaType extensions=".woff"><mimeType>application/font-woff</mimeType></mediaType>
<mediaType extensions=".woff2"><mimeType>application/font-woff2</mimeType></mediaType>
但它不起作用然后我删除了上面的内容并在 web.config 中添加了以下内容,它可以正常工作。
<staticContent>
<remove fileExtension=".woff" />
<!-- In case IIS already has this mime type -->
<mimeMap fileExtension=".woff" mimeType="application/font-woff" />
<remove fileExtension=".woff2" />
<!-- In case IIS already has this mime type -->
<mimeMap fileExtension=".woff2" mimeType="application/font-woff2" />
</staticContent>
但不明白为什么只在特定于 MIMEType 配置的 MimeTypes.config 中添加它时不起作用。
谢谢
【问题讨论】:
标签: sitecore mime-types sitecore8.1 woff woff2