| |
| |
Adding Additional MIME Types
| Reference Number: AA-00160 Views: 756 Created: 2010-07-30 14:36 Last Updated: 2010-07-30 14:38 |
0 Rating/ 1 Voters
|
    |
Overview
Whenever content is returned from a web server it includes a MIME Content
Type header, which provides information to the client about the type of data
which is being returned. Using this header the client is able to determine the
best way to handle the content, which may include opening a helper application.
For files returned directly from the server the MIME type is defined by the
extension of the file.
The following table shows some MIME type examples:
| Type / Subtype |
File Extension |
| application/msword |
doc |
| application/pdf |
pdf |
| video/mpeg |
mpeg |
| video/x-flv |
flv |
| audio/mpeg |
mp3 |
| image/jpeg |
jpg |
| text/html |
html |
Net24 has a predefined server wide list of common MIME types configured on
Windows IIS and Unix Apache servers. However if you have files on your site for
which a MIME type is not defined, the content of these files may not be
displayed correctly by the client.
The predefined list can not be modified, but additional MIME types can be
easily added to individual site following the instructions below:
Adding
MIME Types Under Unix Hosting Accounts
- Determine the MIME type required for the file. A list of registered MIME
types and extensions can be found at: http://www.iana.org/assignments/media-types/
- Create a .htaccess file with a text editor and add each MIME type
using the Apache AddType directive.
Example:
The AddType tells the server to add a new MIME type. The
application/x-shockwave-flash is the actual MIME type and the swf
is the extension of the file. You can add as many MIME types as required, simply
repeat the line for each MIME type. - Save and upload the .htaccess file to the document root of your site; the
new MIME types will active immediately.
Adding
MIME Types Under Windows Hosting Accounts
- Determine the MIME type required for the file. A list of registered MIME
types and extensions can be found at: http://www.iana.org/assignments/media-types/
- Login to the Plesk Server Administrator.
- Select the domain name you wish to add the MIME type for.
- Click on the Web Directories button.
- Select the Mime Types tab and enter the new file extension and MIME
type and click OK.
|
| |
|