windows 通过Web.config添加mimetype映射

Posted huangtailang

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了windows 通过Web.config添加mimetype映射相关的知识,希望对你有一定的参考价值。

在Web.config里添加以下代码即可
  1. <configuration>
  2. <system.webServer>
  3. <staticContent>
  4. <!-- remove first in case they are defined in IIS already, which would cause a runtime error -->
  5. <remove fileExtension=".woff" />
  6. <mimeMap fileExtension=".woff" mimeType="application/font-woff" />
  7. </staticContent>
  8. </system.webServer>
  9. </configuration>

参考:





以上是关于windows 通过Web.config添加mimetype映射的主要内容,如果未能解决你的问题,请参考以下文章