ppypp伦理天堂,91手机在线视频,免费在线观看黄色毛片,夜夜穞天天穞狠狠穞AV美女按摩

聯系官方銷售客服

1835022288

028-61286886

投訴 已解決 不知道我開發的模版哪里出現了問題手機訪問偶爾無法自動跳轉到手 9 0
迅睿CMS版本:4.3.3 #手機域名模式

不知道我開發的模版哪里出現了問題,http://www.tyjs158.com/手機訪問偶爾無法自動跳轉到手機端http://m.tyjs158.com/
微信截圖_20191211203650.png

不知道是不是因為我使用了加速樂 緩存 的問題

解決方案
  • 靜態是不能跳轉的,要加js識別代碼,手冊有

  • 可以在靜態頁面引入或者加入一個js,由js判斷跳轉

  • <script type="text/javascript">    
    var siteurl = 'https://m.yourdomain.com';    
    // 跳桌面版    
    if (!(navigator.userAgent.match(/(iPhone|iPod|Android|Windows Phone)/i))) {    
    var url=window.location.href;    
    // url=url.replace('http://m.','http://www.');    
    url=url.replace('https://m.','https://www.');    
    location.replace(url);    
    }    
    </script>    
    
    上面代碼是在手機模板head內加入
    <script type="text/javascript">
                var new_url = window.location.href;
                if(new_url.indexOf('http://yourdomain') >= 0 || new_url.indexOf('https://yourdomain') >= 0) {
                    new_url = new_url.replace('http://yourdomain', 'http://www.yourdomain');
                    new_url = new_url.replace('https://yourdomain', 'http://www.yourdomain');
                    window.location.replace(new_url);
                }
                var siteurl = 'http://www.iyourdomain.net/';
            </script>
                    <script type="text/javascript">
                <!--跳m站-->
                function getCookie(nm) {
                    var arr, reg = new RegExp("(^| )" + nm + "=([^;]*)(;|$)");
                    if (arr = document.cookie.match(reg)) {
                        return unescape(arr[2]);
                    } else {
                        return null;
                    }
                }
                if ((navigator.userAgent.match(/(iPhone|iPod|Android|Windows Phone)/i))) {
                    if(getCookie('mfjian') == null) {
                        var url = window.location.href;
                        url = url.replace('http://yourdomain', 'http://m.yourdomain');
                        url = url.replace('https://yourdomain', 'https://m.yourdomain');
                        url = url.replace('http://www.', 'http://m.');
                        url = url.replace('https://www.', 'https://m.');
                        location.replace(url);
                    }
                }/*else{
                    var curProtocol = window.location.protocol.split(':')[0];
                    if (curProtocol === 'http') {
                        var url=window.location.href;
                        url=url.replace('http://','https://');
                        location.replace(url);
                    }
                }*/
            </script>
            
            
             在電腦模板head中加入
    俺每天為您制造快樂https://hahagu.com
  • 有地址嗎,我幫你看看

    俺每天為您制造快樂https://hahagu.com
  • @sunbingchen:感謝,問題已解決