Managing MIME Types for Virtual Directories
Multipurpose Internet Mail Exchange (MIME) types instruct a Web browser or mail application how to handle files received from a server. For example, when a Web browser requests an item on a server, it also requests the MIME type of the object. Some MIME types, like graphics, can be displayed inside the browser. Others, such as word processing documents, require an external helper application to be displayed.
When a web server delivers a Web page to a client Web browser, it also sends the MIME type of the data it is sending. If there is an attached or embedded file in a specific format, IIS also tells the client application the MIME type of the embedded or attached file. The client application then knows how to process or display the data being received from IIS.
IIS can only operate files of registered MIME types. These types could be defined both on the global IIS level and on the domain or virtual directory level. Globally defined MIME types are inherited by all the domains and virtual directories while ones defined on the domain or virtual directory level are used only for the area where they are defined. Otherwise, if the web server receives request for a file with unregistered MIME type, it returns the 404.3 (Not Found) error.
To add a new MIME type for a virtual directory on a domain:
- Click
Web Directories on your Home page - Navigate to the required virtual directory and enter it.
- Select the MIME Types tab.
- Click Add New MIME Type.
- Type the filename extension in the Extension field. Filename extention should begin with a dot (.), or a wildcard (*) to serve all files regardless of filename extension.
- Specify the file content type in the Content field.
- You can either select the appropriate value from the list or define a new content type. To do this, select Custom... and enter the content type in the input box provided.
- Click OK to finish the creation.
To edit an existing MIME type for a virtual directory on a domain:
- Click
Web Directories on your Home page - Navigate to the required virtual directory and enter it.
- Select the MIME Types tab.
- Select the required MIME type in the list.
- Type the filename extension in the Extension field. Filename extention should begin with a dot (.), or a wildcard (*) to serve all files regardless of filename extension.
- Specify the file content type in the Content field.
- You can either select the appropriate value from the list or define a new content type. To do this, select Custom... and enter the content type in the input box provided.
- Click OK to save changes.
To remove a MIME type for a virtual directory on a domain:
- Click
Web Directories on your Home page - Navigate to the required virtual directory and enter it.
- Select the MIME Types tab.
- Select the checkbox corresponding to the MIME type you wish to remove.
- Click
Remove Selected. - Confirm removal and click OK.