Apache 是一个优秀的应用服务器程序,已经提供了对一般WAP的支持。
如果你不确定你的Apache是否配置好了WAP支持,可以看一下Apache的配置文件"mime.types"。如果配置文件中这么一行:
text/vnd.wap.wml wml
如果没有的话,也不用着急,加上这一行就行了。如果你要配置全面一些的话还要加上以下几行:
image/vnd.wap.wbmp wbmp
text/vnd.wap.wmls wmls
application/vnd.wap.wmlc wmlc
application/vnd.wap.wmlscriptcwmlsc
text/vnd.wap.wmlscript wsc
text/vnd.wap.wmlscript wmlscript
修改好以后,重新启动Apache就可以了。
如果要系统支持index.wml的话,还得配置Apache的httpd.conf,类似添加index.php的配置了,略。
只所以说支持的是一般WAP,像一些安装文件jar,jad,sis之类的安装文件就没有默认支持。
如果要使Apache支持OTA(WAP PUSH)下载的话,还得在mime.types中添加下面几行:
AddType image/vnd.nokia.ota-bitmap ota
AddType text/vnd.sun.j2me.app-descriptor jad
AddType application/java-archive jar
AddType application/vnd.Nokie.ringing-tone rng
AddType application/vnd.symbian.install sis
(不加的话,下载类似sis的安装文件会直接打开该文件,而不会直接执行。)
更详细的文件类型配置如下:
AddType text/vnd.sun.j2me.app-descriptor jad
AddType application/java-archive jar
AddType text/vnd.wap.wml wml
AddType audio/amr amr
AddType audio/midi mid
AddType audio/midi midi
AddType application/vnd.Nokie.ringing-tone rng
AddType application/vnd.symbian.install sis
AddType application/vnd.wap.wmlc wmlc
AddType text/vnd.wap.wmlscript wmls
AddType text/vnd.wap.wmlscript wmlsc
AddType application/vnd.wap.sic sic
AddType text/vnd.wap.si si
AddType text/vnd.wap.sl sl
AddType application/vnd.wap.slc slc
AddType text/x-vCalendar vcs
AddType text/Card vcf
AddType application/vnd.nokia.gamedata nqd
AddType application/x-nokiagamedata ngd
AddType image/vnd.wap.wmbp wbmp
AddType image/x-bmp bmp
AddType image/x-epoc-mbm mbm
AddType image/vnd.nok-3dscreensaver n3a
AddType text/x-co-desc cod
AddType image/vnd.nok-oplogo-colornokia-op-logo nok
AddType application/x-pmd .pmd
AddType audio/vnd.qcelp .qcp
AddType application/x-smaf .mmf
AddType application/vnd.smaf
保存后,重启下Apache,OK了!
13:54 | 固定链接 | 评论 (2) | 引用通告 (0)
固定链接 关闭
MIME Type 增补
Built-in Mime-Types (for MP3) mime1type = "Content-type: audio/mp3 ";
mime2type = "Content-type: audio/mpeg ";
mime3type = "Content-type: audio/x-mp3 ";
mime4type = "Content-type: audio/x-mpeg ";
mime5type = "Content-type: audio/m3u ";
mime6type = "Content-type: audio/x-m3u ";