Skip to content

Instantly share code, notes, and snippets.

@chrisdavidmiles
Created May 23, 2017 19:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chrisdavidmiles/0b51583ef9a488a933e5fd3e644781e8 to your computer and use it in GitHub Desktop.
Save chrisdavidmiles/0b51583ef9a488a933e5fd3e644781e8 to your computer and use it in GitHub Desktop.
Secure MIME Types .htaccess
# BEGIN Secure MIME-types
<FilesMatch "\.[Jj][Pp][Ee]?[Gg]$">
ForceType image/jpeg
</FilesMatch>
<FilesMatch "\.[Pp][Nn][Gg]$">
ForceType image/png
</FilesMatch>
<FilesMatch "\.[Gg][Ii][Ff]$">
ForceType image/gif
</FilesMatch>
<FilesMatch "\.[Ii][Cci][Oo]$">
ForceType image/ico
</FilesMatch>
<FilesMatch "\.[Mm][Ppi][4]$">
ForceType video/mp4
</FilesMatch>
<FilesMatch "\.[Oo][Gg][Gg]$">
ForceType video/ogg
</FilesMatch>
<FilesMatch "\.[Mm][Oo][Vv]$">
ForceType video/mov
</FilesMatch>
<FilesMatch "\.[Mm][Kk][Vv]$">
ForceType video/mkv
</FilesMatch>
# END Secure MIME-types
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment