Skip to Navigation

Home -> Articles & Tutorials -> .htaccess -> Adding MIME Types

Tutorial -:- Adding MIME Types -

What if your server wasn't set up to deliver certain file types properly? A common occurrence with MP3 or even SWF files. Simple enough to fix:

AddType application/x-shockwave-flash swf

AddType is specifying that you are adding a MIME type. The application string is the actual parameter of the MIME you are adding, and the final little bit is the default extension for the MIME type you just added, in our example this is swf for ShockWave File.

By the way, here's a neat little trick that few know about:
To force a file to be downloaded, via the Save As browser feature, you can simply set a MIME type to application/octet-stream and that immediately prompts you for the download. I have no idea how that would be useful, some one asked me to include it, so there you go. :)

We have also compiled a List of Common Mime Types for you to browse.

And on we go.... again