IS如何增加处理不同的文件扩展名(MIME类型)?常见文件http中content-type头值(MIME类型)
----------------------------------------------------------------------------------------
例如:增加了一个.jst的文件类型,如果不作设定,文件是打不开的!
解决办法是在IIS增加IIS MIME 类型关联,这样就可以正常访问.jst文件了。
方法如下:IIS -> 网站 -> 属性 -> HTTP头 -> MIME类型 -> 新建
扩展名:.jst / MIME类型:text/html -> 确定
----------------------------------------------------------------------------------------
常见文件http中content-type头值(MIME类型)
.ppt MIME:application/mspowerpoint
.ai MIME:application/postscript
.aif MIME:audio/x-aiff
.aifc MIME:audio/x-aiff
.aiff MIME:audio/x-aiff
.asc MIME:text/plain
.au MIME:audio/basic
.avi MIME:video/x-msvideo
.bcpio MIME:application/x-bcpio
.bin MIME:application/octet-stream
.c MIME:text/plain
.cc MIME:text/plain
.ccad MIME:application/clariscad
.cdf MIME:application/x-netcdf
.class MIME:application/octet-stream
.cpio MIME:application/x-cpio
.cpt MIME:application/mac-compactpro
.csh MIME:application/x-csh
.css MIME:text/css
.dcr MIME:application/x-director
.dir MIME:application/x-director
.dms MIME:application/octet-stream
.doc MIME:application/msword
.drw MIME:application/drafting
.dvi MIME:application/x-dvi
.dwg MIME:application/acad
.dxf MIME:application/dxf
.dxr MIME:application/x-director
.eps MIME:application/postscript
.etx MIME:text/x-setext
.exe MIME:application/octet-stream
.ez MIME:application/andrew-inset
.f MIME:text/plain
.f90 MIME:text/plain
.fli MIME:video/x-fli
.gif MIME:image/gif
.gtar MIME:application/x-gtar
.gz MIME:application/x-gzip
.h MIME:text/plain
.hdf MIME:application/x-hdf
.hh MIME:text/plain
.hqx MIME:application/mac-binhex40
.htm MIME:text/html
.html MIME:text/html
.ice MIME:x-conference/x-cooltalk
.ief MIME:image/ief
.iges MIME:model/iges
.igs MIME:model/iges
.ips MIME:application/x-ipscript
.ipx MIME:application/x-ipix
.jpe MIME:image/jpeg
.jpeg MIME:image/jpeg
.jpg MIME:image/jpeg
.js MIME:application/x-javascript
.kar MIME:audio/midi
.latex MIME:application/x-latex
.lha MIME:application/octet-stream
.lsp MIME:application/x-lisp
.lzh MIME:application/octet-stream
.m MIME:text/plain
.man MIME:application/x-troff-man
.me MIME:application/x-troff-me
.mesh MIME:model/mesh
.mid MIME:audio/midi
.midi MIME:audio/midi
.mif MIME:application/vnd.mif
.mime MIME:www/mime
.mov MIME:video/quicktime
.movie MIME:video/x-sgi-movie
.mp2 MIME:audio/mpeg
.mp3 MIME:audio/mpeg
.mpe MIME:video/mpeg
.mpeg MIME:video/mpeg
.mpg MIME:video/mpeg
.mpga MIME:audio/mpeg
.ms MIME:application/x-troff-ms
.msh MIME:model/mesh
.nc MIME:application/x-netcdf
.oda MIME:application/oda
.pbm MIME:image/x-portable-bitmap
.pdb MIME:chemical/x-pdb
.pdf MIME:application/pdf
.pgm MIME:image/x-portable-graymap
.pgn MIME:application/x-chess-pgn
.png MIME:image/png
.pnm MIME:image/x-portable-anymap
.pot MIME:application/mspowerpoint
.ppm MIME:image/x-portable-pixmap
.pps MIME:application/mspowerpoint
.ppt MIME:application/mspowerpoint
.ppz MIME:application/mspowerpoint
.pre MIME:application/x-freelance
.prt MIME:application/pro_eng
.ps MIME:application/postscript
.qt MIME:video/quicktime
.ra MIME:audio/x-realaudio
.ram MIME:audio/x-pn-realaudio
.ras MIME:image/cmu-raster
.rgb MIME:image/x-rgb
.rm MIME:audio/x-pn-realaudio
.roff MIME:application/x-troff
.rpm MIME:audio/x-pn-realaudio-plugin
.rtf MIME:text/rtf
.rtx MIME:text/richtext
.scm MIME:application/x-lotusscreencam
.set MIME:application/set
.sgm MIME:text/sgml
.sgml MIME:text/sgml
.sh MIME:application/x-sh
.shar MIME:application/x-shar
.silo MIME:model/mesh
.sit MIME:application/x-stuffit
.skd MIME:application/x-koan
.skm MIME:application/x-koan
.skp MIME:application/x-koan
.skt MIME:application/x-koan
.smi MIME:application/smil
.smil MIME:application/smil
.snd MIME:audio/basic
.sol MIME:application/solids
.spl MIME:application/x-futuresplash
.src MIME:application/x-wais-source
.step MIME:application/STEP
.stl MIME:application/SLA
.stp MIME:application/STEP
.sv4cpio MIME:application/x-sv4cpio
.sv4crc MIME:application/x-sv4crc
.swf MIME:application/x-shockwave-flash
.t MIME:application/x-troff
.tar MIME:application/x-tar
.tcl MIME:application/x-tcl
.tex MIME:application/x-tex
.texi MIME:application/x-texinfo
.texinfo MIME:application/x-texinfo
.tif MIME:image/tiff
.tiff MIME:image/tiff
.tr MIME:application/x-troff
.tsi MIME:audio/TSP-audio
.tsp MIME:application/dsptype
.tsv MIME:text/tab-separated-values
.txt MIME:text/plain
.unv MIME:application/i-deas
.ustar MIME:application/x-ustar
.vcd MIME:application/x-cdlink
.vda MIME:application/vda
.viv MIME:video/vnd.vivo
.vivo MIME:video/vnd.vivo
.vrml MIME:model/vrml
.wav MIME:audio/x-wav
.wrl MIME:model/vrml
.xbm MIME:image/x-xbitmap
.xlc MIME:application/vnd.ms-excel
.xll MIME:application/vnd.ms-excel
.xlm MIME:application/vnd.ms-excel
.xls MIME:application/vnd.ms-excel
.xlw MIME:application/vnd.ms-excel
.xml MIME:text/xml
.xpm MIME:image/x-xpixmap
.xwd MIME:image/x-xwindowdump
.xyz MIME:chemical/x-pdb
.zip MIME:application/zip.
.torrent MIME:application/octet-stream
----------------------------------------------------------------------------------------
IIS6的MIME类型设置
由于 IIS6 默认没有添加上一些 MIME ,在下载这些文件时会提示找不到文件,所以要手动添加上去,
而且还要在IIS中,进入网站的属性,把主目录里面的执行权限设置成纯脚本。
Mime-Types(mime类型) Dateiendung(扩展名) Bedeutung
application/msexcel *.xls *.xla Microsoft Excel Dateien
application/mshelp *.hlp *.chm Microsoft Windows Hilfe Dateien
application/mspowerpoint *.ppt *.ppz *.pps *.pot Microsoft Powerpoint Dateien
application/msword *.doc *.dot Microsoft Word Dateien
application/octet-stream *.exe exe
application/pdf *.pdf Adobe PDF-Dateien
application/postscript *.ai *.eps *.ps Adobe Postscript-Dateien
application/rtf *.rtf Microsoft RTF-Dateien
application/x-httpd-php *.php *.phtml PHP-Dateien
application/x-javascript *.js serverseitige JavaScript-Dateien
application/x-shockwave-flash *.swf *.cab Flash Shockwave-Dateien
application/zip *.zip ZIP-Archivdateien
audio/basic *.au *.snd Sound-Dateien
audio/mpeg *.mp3 MPEG-Dateien
audio/x-midi *.mid *.midi MIDI-Dateien
audio/x-mpeg *.mp2 MPEG-Dateien
audio/x-wav *.wav Wav-Dateien
image/gif *.gif GIF-Dateien
image/jpeg *.jpeg *.jpg *.jpe JPEG-Dateien
image/x-windowdump *.xwd X-Windows Dump
text/css *.css CSS Stylesheet-Dateien
text/html *.htm *.html *.shtml -Dateien
text/javascript *.js JavaScript-Dateien
text/plain *.txt reine Textdateien
video/mpeg *.mpeg *.mpg *.mpe MPEG-Dateien
video/vnd.rn-realvideo *.rmvb realplay-Dateien
video/quicktime *.qt *.mov Quicktime-Dateien
video/vnd.vivo *viv *.vivo Vivo-Dateien
----------------------------------------------------------------------------------------
IIS WAP服务器的MIME类型配置
如何让手机访问WAP网站服务器?
这其实只需要一部支持wap的手机,一台电脑,一个网关(是硬件,一般由电信服务商提供)就能够了,网关能够临时用电信的,所以您只需要有手机和电脑就能够了。
下载型WAP服务器
.amr audio/amr
.pmdaudio/pmd
.3gp video/3gpp
.cab application/vnd.smartpohone
.gif image/gif
.hme application/vnd.smartphone.thm
.jad text/vnd.sun.j2me.app-descriptor
.jar application/java-archive
.jpg image/jpeg
.mid audio/midi
.mp3 audio/x-mpeg
.mp4 video/mp4
.ogg application/ogg
.pdb application/ebook
.rm video/rm
.rng application/vnd.nokia.ringing-tone
.sdt application/vnd.sie.thm
.sis application/vnd.symbian.install
.thm application/vnd.eri.thm
.tsk application/vnd.ppc.thm
.umd application/umd
.utz application/vnd.uiq.thm
.wav audio/x-wav
.wbmp image/vnd.wap.wbmp
.wml text/vnd.wap.wml
.wmlc application/vnd.wap.wmlc
.wmls text/vnd.wap.wmlscript
.wmlsc application/vnd.wap.wmlscriptc
.wmv video/x-ms-wmv
.wsc application/vnd.wap/wmlscriptc
----------------------------------------------------------------------------------------
一般WAP服务器
.wbmp image/vnd.wap.wbmp
.wml text/vnd.wap.wml
.wmlc application/vnd.wap.wmlc
.wmls text/vnd.wap.wmlscript
.wmlsc application/vnd.wap.wmlscriptc
.wmv video/x-ms-wmv
.wsc application/vnd.wap/wmlscriptc
.gif image/gif
.jpg image/jpeg
.bmp image/bmp
错误出现提示:
网页无法访问!
无法找到该页!
404错误!
已有 759 位网友参与,快来吐槽:
发表评论