Hướng dẫn xóa đuôi ?m=1 trên mobile dành cho blogspot
Khôi Ròm - tháng 6 10, 2019 -
Blogspot, SEO, Thủ thuật blogspot
Xin chào các bạn, mình đã trở lại rồi đây. Hôm nay mình sẽ hướng dẫn các bạn xóa đuôi ?m=1 trên giao diện mobile dành cho blogspot để trang web của bạn trở nên chuyên nghiệp hơn.
Cách thực hiện
Rất dễ thôi, các bạn dán đoạn code này lên trên thẻ đóng head là được<b:if cond='data:blog.isMobile'> <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:if>

