Home > AAPT Information Library > Hosting Documentation > MIME Types

Adding Mime-Types Using the .htaccess file

If you incorporate files in your site which require browser plugins you may need to specify the mime-type.

Although our VWS has a lot of mime-types configured, there are new ones appearing all the time and you may wish to add your own. This simply requires you to create a .htaccess file in your /htdocs directory.

See Customising Access for instructions on creating a .htaccess file.

To specify mime-types, add the following line to your .htaccess file:
AddType type/subtype extension

For example, to add mime types for Shockwave you must add all of the following mime types:
AddType application/x-director dcr
AddType application/x-director dir
AddType application/x-director dxr

Save the file as .htaccess (make sure you have the dot in front of the name) in your htdocs directory.

When a browser requests a file of the type specified, the server will give it the necessary information.


Copyright © AAPT Limited