You are here:Home»KB»Web Server»How to add Mime-Types using .htaccess
Wednesday, 14 October 2009 00:00

How to add Mime-Types using .htaccess

Written by

In case your web hosting account is not configured to serve certain mime types with the proper content type. You can change this using .htaccess file.

For example if you need to configure your server to display ASX files:

AddType video/x-ms-asf asf asx

For windows media audio WMA

AddType audio/x-ms-wma .wma

A comprehensive list of mime-types can be found here

There is one more useful feature of the AddType directive. Most of you most probably know that Internet Explorer opens MS Word, Excell, PDF and some other files inside a browser window. To force the browser to download the file you can use AddType to change the document type:

AddType  application/octet-stream  .doc .xls .pdf
Read 1114 times Last modified on Saturday, 08 November 2014 12:59