在IIS加对SL的支持 How do I add a new file extension / MIME type?

来源:互联网 发布:淘宝指数官网查寻 编辑:程序博客网 时间:2024/05/21 19:39

The following article explains how to create a MIME type for a new file extension. This will allow different file extensions to work in a web browser.

To add a new MIME type, please follow these steps:

  1. Log into your server through Terminal Services or Remote Desktop Connection.
  2. Click Start, select Programs, and then click Administrative Tools.
    • For IIS 5.0 click Internet Services Manager.
    • For IIS 6.0 click Internet Information Services.
  3. In the left column you will see the Server Name.
    • In IIS 5.0, expand the Server Name to find the domain name.
    • In IIS 6.0, expand the Server Name and then Web Sites to find the domain name.
  4. Right-click on the domain name and select Properties.
  5. On the HTTP Headers tab click MIME Types.
  6. Click New.
  7. Enter the appropriate information:
    • Extension - the file type extension.
    • MIME type - the type of file this extension refers to (view a list of common MIME types).
  8. Click Ok.

You may need to restart the IIS service for the MIME type to begin working.

To restart the IIS service, please follow these steps:

  1. Click Start, select Run, type command to open a command prompt.
  2. Type iisreset and press Enter. This will stop the IIS service and then restart it.

 

原创粉丝点击