首页 » 默认不分类 » 怎样让虚拟主机支持手机访问wap上网

怎样让虚拟主机支持手机访问wap上网

怎样让虚拟主机支持手机访问wap上网,其实你不用做任何设置,现在的手机都支持浏览网页的,只不过手机屏幕小,你网页的太宽会撑开而已,我们可以做一个合适手机访问的页面,并在首页判断是浏览器在请求还是wap在请求,并做相应的跳转。

顺便说下,现在国内的政策是在严打wap站,见到就关,原因?不告诉你。原因就是疯了。
本文主要说的是标准wap网页支持方法:
1、去虚拟主机上添加mime类型如下面几个,比如第一条表示wml文件才能解析
text/vnd.wap.wml wml
image/vnd.wap.wbmp wbmp
text/vnd.wap.wmls wmls
application/vnd.wap.wmlc wmlc
application/vnd.wap.wmlscriptc wmlsc
text/vnd.wap.wmlscript wsc
text/vnd.wap.wmlscript wmlscript
2、将您的网页传到主机上去,下面是一个例子

1
2
3
4
5
6
7
8
9
10
11
12
<%@Language=VBScript%> 
<%Response.ContentType="text/vnd.wap.wml"%> 
<?xml version="1.0" encoding="gb2312"?> 
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapfourm.org/DTD/wml_1.1.xml"> 
<wml xml:lang="zh"> 
<head> 
<meta http-equiv="Cache-Control" content="max-age=300" forua="true"/> 
</head> 
<card id="Main" title="Hello" newcontext="false"> 
这是正文
</card> 
</wml>

, ,

转发到新浪微博 转发到新浪微博

目前这篇文章有4条评论(Rss)

  1. http://www.gpsmoto.org/ | #1
    05/16/2012 at 11:01

    I’ve been browsing online more than 3 hours lately, but I by no means found any interesting article like yours. It is beautiful worth enough for me. In my view, if all web owners and bloggers made good content material as you did, the net might be a lot more useful than ever before. “No one has the right to destroy another person’s belief by demanding empirical evidence.” by Ann Landers.

  2. alberghi valmontone | #2
    05/16/2012 at 13:00

    Great post. I was checking constantly this blog and I am impressed! Extremely useful info particularly the last part :) I care for such information much. I was looking for this certain info for a very long time. Thank you and good luck.

  3. zinc | #3
    05/16/2012 at 18:57

    Another very entertaining post. Ive been reading through some of your posts and finally decided to drop a comment on this one. Please feel free to visit my site Doppler

  4. hosting | #4
    05/16/2012 at 19:43

    I truly appreciate this article post.Really thank you! Want more.

我要评论