28 Eylül 2015 Pazartesi

webfontlar mime type ve web.config ayarları

.eot - application/vnd.ms-fontobject
.woff - application/font-woff
.ttf - application/x-font-truetype
.svg - image/svg+xml
.otf - application/x-font-opentype

IIS (Web.Config)
<system.webServer>
  ...
  <staticContent>
  ...
    <remove fileExtension=".eot" />
    <mimeMap fileExtension=".eot" mimeType="application/vnd.ms-fontobject" />
    <remove fileExtension=".woff" />
    <mimeMap fileExtension=".woff" mimeType="application/font-woff" />
    <remove fileExtension=".ttf" />
    <mimeMap fileExtension=".ttf" mimeType="application/x-font-truetype" />
    <remove fileExtension=".svg" />
    <mimeMap fileExtension=".svg" mimeType="image/svg+xml" />
    <remove fileExtension=".otf" />
    <mimeMap fileExtension=".otf" mimeType="application/x-font-opentype" />
  ...
  </staticContent>
  ...
</system.webServer>


Apache (.htaccess)
    AddType application/vnd.ms-fontobject .eot
    AddType application/font-woff .woff
    AddType application/x-font-truetype .ttf
    AddType image/svg+xml .svg
    AddType application/x-font-opentype .otf
    
    # could use application/octet-stream for default binary file transfer
    #AddType application/octet-stream .otf .ttf 

Hiç yorum yok:

Yorum Gönder