1 2 3 4 5 6 | <code><meta name= "mobile-agent" content= "format=html5;url=http://m.xxx.com/abc/" >
<meta name= "mobile-agent" content= "format=xhtml;url=http://m.xxx.com/abc/" >
<script type= "text/javascript" src= "http://siteapp.baidu.com/static/webappservice/uaredirect.js" ></script>
<script type= "text/javascript" >uaredirect( "http://m.xxx.com/abc/" );</script>
</code>
|
ログイン後にコピー
ログイン後にコピー
1 2 | <code>电脑版的链接是http:
</code>
|
ログイン後にコピー
ログイン後にコピー
回复内容:
1 2 3 4 5 6 | <code><meta name= "mobile-agent" content= "format=html5;url=http://m.xxx.com/abc/" >
<meta name= "mobile-agent" content= "format=xhtml;url=http://m.xxx.com/abc/" >
<script type= "text/javascript" src= "http://siteapp.baidu.com/static/webappservice/uaredirect.js" ></script>
<script type= "text/javascript" >uaredirect( "http://m.xxx.com/abc/" );</script>
</code>
|
ログイン後にコピー
ログイン後にコピー
1 2 | <code>电脑版的链接是http:
</code>
|
ログイン後にコピー
ログイン後にコピー
一般都是先匹配手机的ua信息,如果符合就重定向。
还有判断手机分辨率的(但是不多)
看一下这个文件就都明白了嘛,: http://siteapp.baidu.com/static/webappservice/uaredirect.js , 其中应该有个 function uaredirect