Skip to content

Instantly share code, notes, and snippets.

@localpcguy
Last active July 29, 2021 13:37
Show Gist options
  • Save localpcguy/6002288 to your computer and use it in GitHub Desktop.
Save localpcguy/6002288 to your computer and use it in GitHub Desktop.
Mime Types for Fonts and Media
.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)
<remove fileExtension=".eot" />
<mimeMap fileExtension=".eot" mimeType="application/vnd.ms-fontobject" />
<remove fileExtension=".ttf" />
<mimeMap fileExtension=".ttf" mimeType="application/x-font-truetype" />
<remove fileExtension=".woff" />
<mimeMap fileExtension=".woff" mimeType="application/font-woff" />
<remove fileExtension=".svg" />
<mimeMap fileExtension=".svg" mimeType="image/svg+xml" />
<mimeMap fileExtension=".otf" mimeType="application/x-font-opentype" />
Apache (.htaccess)
AddType application/vnd.ms-fontobject .eot
AddType application/x-font-truetype .ttf
AddType application/font-woff .woff
AddType application/x-font-opentype .otf
# could use application/octet-stream for default binary file transfer
#AddType application/octet-stream .otf .ttf
.mp4 - video/mp4
.ogv - video/ogg
.m4v - video/mp4
.webm - video/webm
Web.Config (IIS)
<remove fileExtension=".mp4" />
<mimeMap fileExtension=".mp4" mimeType="video/mp4" />
<remove fileExtension=".ogv" />
<mimeMap fileExtension=".ogv" mimeType="video/ogg" />
<remove fileExtension=".m4v" />
<mimeMap fileExtension=".m4v" mimeType="video/mp4" />
<remove fileExtension=".webm" />
<mimeMap fileExtension=".webm" mimeType="video/webm" />
Apache
AddType video/mp4 .mp4 .m4v
AddType video/ogg .ogv
AddType video/webm .webm
@localpcguy
Copy link
Author

Thanks for the correction and updates 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment