Hướng dẫn cách xóa ?m=1 trên thanh địa chỉ Blogspot giao diện Mobile


Khi bạn truy cập vào một Blogspot trên giao diện Mobile thì link URL trang web sẽ có thêm đoạn ?m=1. Bài viết này mình sẽ chia sẻ cho bạn thủ thuật xóa ?m=1 trên thanh địa chỉ Blogspot, giúp blog của bạn hiển thị một cách chuyên nghiệp hơn mà không ảnh hưởng gì tới SEO.

Hướng dẫn xóa ?m=1 trên thanh địa chỉ Blogger

Bước 1: Đăng nhập vào trang quản trị Blogger ⇒ Chọn Chủ đề ⇒ Chỉnh sửa HTML.
Bước 2: Ctrl + F tìm thẻ </head> và dán code phía dưới lên trên nó.
<script>/*<![CDATA[*/ var uri = window.location.toString(); if (uri.indexOf("%3D","%3D") > 0) { var clean_uri = uri.substring(0, uri.indexOf("%3D")); window.history.replaceState({}, document.title, clean_uri);} var uri = window.location.toString(); if (uri.indexOf("%3D%3D","%3D%3D") > 0) { var clean_uri = uri.substring(0, uri.indexOf("%3D%3D")); window.history.replaceState({}, document.title, clean_uri);} var uri = window.location.toString(); if (uri.indexOf("&m=1","&m=1") > 0) { var clean_uri = uri.substring(0, uri.indexOf("&m=1")); window.history.replaceState({}, document.title, clean_uri); } var uri = window.location.toString(); if (uri.indexOf("?m=1","?m=1") > 0) { var clean_uri = uri.substring(0, uri.indexOf("?m=1"));window.history.replaceState({}, document.title, clean_uri);}; var protocol=window.location.protocol.replace(/\:/g,''); if(protocol=='http'){ var url=window.location.href.replace('http','https'); window.location.replace(url);} /*]]>*/</script>
Bước 3: Lưu lại chủ đề và tận hưởng thành quả.
Với thủ thuật nhỏ này hy vọng sẽ giúp blog của các bạn chuyên nghiệp hơn.
Nguồn: https://www.daudung.com/2019/09/huong-dan-cach-xoa-m1-tren-thanh-dia-chi-blogspot.html

Post a Comment

0 Comments