導讀:dedecmsdedecms按照官方的寫法,代碼如下: 跳轉到手機站首頁代碼(需要加到pc站頭部中): meta http-equiv=mobile-agent content=formadede模板堂dede,模板。
按照官方的寫法,代碼如下:
跳轉到手機站首頁代碼(需要加到pc站頭部中):
dede手機模板
<meta http-equiv="mobile-agent" content="format=xhtml;url={dede:global.cfg_mobileurl/}/index.php">
<script type="text/javascript">if(window.location.toString().indexOf('pref=padindex') != -1){}else{if(/AppleWebKit.*Mobile/i.tesdede會員中心模板t(navigator.userAgent) || (/MIDP|SymbianOS|NOKIA|SAMSUNG|LG|NEC|TCL|Alcatel|BIRD|DBTEL|Dopod|PHILIPS|HAIER|LENOVO|MOT-|Nokia|SonyEricsson|SIE-|Amoi|ZTE/.test(navigator.userAgent))){if(window.location.href.indexOf("?mobile")<0){try{if(/Android|Windows Phone|webO織夢文章模板S|iPhone|iPod|BlackBerry/i.test(navigator.userAgent)){window.location.href="{dede:global.cfg_mobileurl/}/index.php";}else if(/iPad/i.test(navigator.userAgent)){}else{}}catch(e){}}}}</script>
|
跳轉到手機站列表頁代碼(需要加到pc站列表頁頭部中):
<meta http-equiv="mobile-agent" content="format=xhtml;url={dede:global.cfg_mobileurl/}/list.php?tid={dede:field.id/}">
<script type="text/javascript">if(window.location.toString().indexOf('pref=padindex') != -1){}else{if(/AppleWebKit.*Mobile/i.test(navigator.userAgent) || (/MIDP|SymbianOS|NOKIA|SAMSUNG|LG|NEC|TCL|Alcatel|BIRD|DBTEL|Dopod|PHILIPS|HAIER|LENOVO|MOT-|Nokia|SonyEricsson|SIE-|Amoi|ZTE/.test(navigator.userAgent))){if(window.location.href.indexOf("?mobile")<0){try{if(/Android|Windows Phone|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent)){window.location.href="{dede:global.cfg_mobileurl/}/list.php?tid={dede:field.id/}";}else if(/iPad/i.test(navigator.userAgent)){}else{}}catch(e){}}}}</script>
|
跳轉到手機站內容頁代碼(需要加到pc站內容頁頭部中):
<meta http-equiv="mobile-agent" content="format=xhtml;url={dede:global.cfg_mobileurl/}/view.php?aid={dede:field.id/}">
<script type="text/javascript">if(window.location.toString().indexOf('pref=padindex') != -1){}else{if(/AppleWebKit.*Mobile/i.test(navigator.userAgent) || (/MIDP|SymbianOS|NOKIA|SAMSUNG|LG|NEC|TCL|Alcatel|BIRD|DBTEL|Dopod|PHILIPS|HAIER|LENOVO|MOT-|Nokia|SonyEricsson|SIE-|Amoi|ZTE/.test(navigator.userAgent))){if(window.location.href.indexOf("?mobile")<0){try{if(/Android|Windows Phone|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent)){window.location.href="{dede:global.cfg_mobileurl/}/view.php?aid={dede:field.id/}";}else if(/iPad/i.test(navigator.userAgent)){}else{}}catch(e){}}}}</script>
關鍵詞標簽: 手機 夢網 跳轉到
聲明: 本文由我的SEOUC技術文章主頁發布于:2023-07-17 ,文章織夢網站自動跳轉到手機站/m目錄的辦法,dedecms主要講述夢網,跳轉到,手機網站建設源碼以及服務器配置搭建相關技術文章。轉載請保留鏈接: http://www.bifwcx.com/article/web_28492.html
為你推薦與織夢網站自動跳轉到手機站/m目錄的辦法,dedecms相關的文章
網站建設技術SEOUC.COM
專注網站建設,SEO優化,小程序設計制作搭建開發定制網站等,數千家網站定制開發案例,網站推廣技術服務。
5000+合作客服
8年從業經驗
150+覆蓋行業
主站蜘蛛池模板:
天津市|
麻栗坡县|
平遥县|
五家渠市|
林口县|
当阳市|
海原县|
交城县|
临海市|
滁州市|
娄烦县|
轮台县|
札达县|
来安县|
南投县|
靖西县|
朝阳市|
富民县|
双城市|
仪陇县|
凤城市|
宜良县|
岐山县|
明水县|
内乡县|
电白县|
延边|
宝应县|
三门峡市|
彭水|
德昌县|
武山县|
新乡县|
宜良县|
华蓥市|
铜鼓县|
曲沃县|
玛纳斯县|
合作市|
深水埗区|
宜丰县|
|