Cách làm trang chuyển hướng khỏi Blog cho Blogspot (Blogger)

Nếu bạn đang có các mục chia sẻ File download hoặc gắn các link rút gọn để kiếm tiền thì trang chuyển hướng liên kết là một điều tuyệt vời! Bạn vừa giữ được người xem ở lại trang chính, vừa có thêm thu nhập khi gắn quảng cáo cho trang chuyển hướng.

Cách làm trang chuyển hướng khỏi Blog cho Blogspot (Blogger)

Chức năng cũng tương tự như link rút gọn kiếm tiền vậy. Nếu bạn đang tìm cách tạo trang chuyển hướng liên kết cho Blogger thì áp dụng vào blog ngay và luôn thôi.

Khi khách truy cập muốn tải xuống một số tệp nhất định trên blog, họ sẽ được dẫn đến một trang nhất định của blog trước khi đến trang tải xuống cuối cùng.

Mẫu trang chờ chuyển hướng tương tự như sau:

Cách làm trang chuyển hướng khỏi Blog cho Blogspot (Blogger)

Nếu trang của bạn là blog chia sẻ phần mềm, tài liệu,... mà liên kết ra ngoài cực nhiều. Vậy thì trang chuyển hướng liên kết này của bạn sẽ là nguồn thu nhập chính. Vì mọi liên kết ra ngoài sẽ phải đi qua trang này, quảng cáo hiển thị cực nhiều và bắt mắt dễ được click!

Tạo trang chờ chuyển hướng liên kết

Bước 1: Tạo một trang tĩnh cho blog

$ads={1}

Bạn tạo một trang mới và đặt tên ví dụ như: “Chuyển hướng” để lấy link trang là “chuyen-huong” cho chuyên nghiệp. Chuyển sang khung soạn thảo HTML, chép và dán hết đoạn code bên dưới vào:

<div class='separator' style='text-align:center'>

<div class='ads-top'>

<!-- Thêm mã quảng cáo trên đầu-->


</div>


<div class='safelink' id='safelink'>

<center><div class='button outline' id='daplong'>Vui lòng đợi...</div>

<script>/*<![CDATA[*/ var currentURL=location.href; var str = currentURL; var res = str.replace('https://www.truongblogger.top/p/to-go.html' + '?url=', ""); function changeLink(){var decodedString = Base64.decode(res); window.open(decodedString,'_blank')}; document.write('<a href="#go-link" id="download-safelink" class="button outline">Click to go to the link</a>'); var linkDL = document.getElementById("download-safelink"); var notif = document.getElementById("daplong"); var waktu = 20; var teks_waktu = document.createElement("span"); linkDL.parentNode.replaceChild(teks_waktu, linkDL); var id; id = setInterval(function () { waktu--; if (waktu < 0) { teks_waktu.parentNode.replaceChild(linkDL, teks_waktu); clearInterval(id); notif.style.display = "none"; linkDL.style.display = "inline-block"; } else { teks_waktu.innerHTML = "Link will appear in " + waktu.toString() + " second"; }}, 1000); /*]]>*/</script></center>

</div>


<div class='separator-text'>

<!-- Thêm vài dòng mô tả hoặc nội dung (cho chuyên nghiệp) -->


</div>


<div class='blockLink' style='text-align:center'>

<div id='ads-left' class='ads-left'>

<!-- Thêm mã quảng cáo tại đây (mã hiện bên trái loại 300x250) -->


</div>


<div id='go-link'>

<a class='button outline' href='javascript:void(0)' onclick='changeLink();' rel='nofollow noreferrer'>Đi đến liên kết</a>

</div>


<div id='ads-right' class='ads-right'>

<!-- Thêm mã quảng cáo tại đây (mã hiện bên phải loại 300x250) -->


</div>

</div>{codeBox}

  • Lấy url liên kết của trang mà bạn vừa tạo trước đó và thay thế url https://www.truongblogger.top/p/to-go.html
  • Số 20 là thời gian đếm ngược
  • Đặt các bài viết và mã Adsense của bạn vào phần được đánh dấu.

Bước 2:  Thêm CSS và Javascript để tiện ích này hoạt động

- Thêm CSS vào trong cặp thẻ <style>CSS</style> hoặc xác định phần Css trong trang của bạn

/* Safelink */

.button.outline{display: inline-flex;display: -webkit-inline-flex;flex-wrap: wrap;-webkit-flex-wrap: wrap;align-items: center;-webkit-align-items: center;margin-bottom: 10px;padding: 10px 20px;border-radius: 10px;font-size: 15px;line-height: 1.3rem;background-color: #fff;color: #161617;}

.button.outline{background-color:  transparent;box-shadow: 0 2px 5px 0 rgba(0,0,0,.1);}

.safelink span{display: block;font-size: 12px}

.blockLink{display: flex;display: -webkit-flex;flex-wrap: wrap;-webkit-flex-wrap: wrap;align-items: center;-webkit-align-items: center}

.blockLink > div{display: block;width: 35%;}

.blockLink > div#go-link{width: 30%;}

.blockLink > div#go-link a{display: none;margin: 0}

.blockLink > div#go-link:target a{display: inline-flex}

.ads-top{margin: 0 0 20px 0;text-align: center}

#HTML99,#HTML99 .widget-content{border: 0 !important;margin: 0 !important;padding: 0 !important}


/* Responsive */

@media screen and (max-width: 768px)

{.blockLink > div{width: 100% !important;margin: 0 0 15px;text-align: center}

.blockLink > div:last-child{margin: 0}

}{codeBox}

- Thêm Javascript vào trước </head> hoặc </body>.

<b:if cond='data:view.isPage'>

<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>{codeBox}

Bước 3: Tạo một Widget mới

Tìm phần tiện ích thanh bên trong mẫu của bạn, phần này thường được gắn thẻ bằng mã <b:section> hoặc <b:widget>, thêm tiện ích mới bằng cách sao chép và dán mã bên dưới vào trước thẻ đóng </b:section>.

<b:widget cond='data:view.isSingleItem' id='HTML99' locked='false' title='Safelink' type='HTML' version='1'>

  <b:widget-settings>

    <b:widget-setting name='content'/>

  </b:widget-settings>

  <b:includable id='main'>

    <div class='widget-content'>

      <script>/*<![CDATA[*/ var Base64 = {_keyStr: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", encode: function (input) {var output = ""; 

      var chr1, chr2, chr3, enc1, enc2, enc3, enc4; var i = 0; input = Base64._utf8_encode(input); 

      while (i < input.length) {chr1 = input.charCodeAt(i++); 

      chr2 = input.charCodeAt(i++); chr3 = input.charCodeAt(i++); enc1 = chr1 >> 2; enc2 = ((chr1 & 3) << 4) | (chr2 >> 4); enc3 = ((chr2 & 15) << 2) | (chr3 >> 6); enc4 = chr3 & 63; 

      if (isNaN(chr2)) {enc3 = enc4 = 64;} else if (isNaN(chr3)) {enc4 = 64;} output = output + this._keyStr.charAt(enc1) + this._keyStr.charAt(enc2) + this._keyStr.charAt(enc3) + this._keyStr.charAt(enc4);} return output; }, decode: function (input) {var output = ""; var chr1, chr2, chr3; 

      var enc1, enc2, enc3, enc4; var i = 0; input = input.replace(/[^A-Za-z0-9\+\/\=]/g, ""); while (i < input.length) {enc1 = this._keyStr.indexOf(input.charAt(i++)); enc2 = this._keyStr.indexOf(input.charAt(i++)); enc3 = this._keyStr.indexOf(input.charAt(i++)); enc4 = this._keyStr.indexOf(input.charAt(i++)); chr1 = (enc1 << 2) | (enc2 >> 4); chr2 = ((enc2 & 15) << 4) | (enc3 >> 2); chr3 = ((enc3 & 3) << 6) | enc4; output = output + String.fromCharCode(chr1); 

      if (enc3 != 64) {output = output + String.fromCharCode(chr2);} if (enc4 != 64) {output = output + String.fromCharCode(chr3);} } output = Base64._utf8_decode(output); return output;}, _utf8_encode: function (string) {string = string.replace(/\r\n/g, "\n"); var utftext = ""; for (var n = 0; n < string.length; n++) {var c = string.charCodeAt(n); 

      if (c < 128) {utftext += String.fromCharCode(c);} else if ((c > 127) && (c < 2048)) {utftext += String.fromCharCode((c >> 6) | 192); 

      utftext += String.fromCharCode((c & 63) | 128);} else {utftext += String.fromCharCode((c >> 12) | 224); utftext += String.fromCharCode(((c >> 6) & 63) | 128); utftext += String.fromCharCode((c & 63) | 128); }} return utftext;}, _utf8_decode: function (utftext) {var string = ""; var i = 0; var c = c1 = c2 = 0; while (i < utftext.length) {c = utftext.charCodeAt(i); if (c < 128) {string += String.fromCharCode(c); i++;} else if ((c > 191) && (c < 224)) {c2 = utftext.charCodeAt(i + 1); string += String.fromCharCode(((c & 31) << 6) | (c2 & 63)); i += 2;} else {c2 = utftext.charCodeAt(i + 1); c3 = utftext.charCodeAt(i + 2); string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63)); i += 3;}} return string; }}; var encode = document.getElementById('encode'), decode = document.getElementById('decode'), output = document.getElementById('output'), input = document.getElementById('input'); 

      var User_ID = ""; var protected_links = ""; var a_to_va = 0; var a_to_vb = 0; var a_to_vc = ""; function auto_safelink() {auto_safeconvert();}; function auto_safeconvert() {var a_to_vd = window.location.hostname; if (protected_links != "" && !protected_links.match(a_to_vd)) {protected_links += ", " + a_to_vd;} else if (protected_links == "") {protected_links = a_to_vd;} var a_to_ve = ""; 

      var a_to_vf = new Array(); var a_to_vg = 0; a_to_ve = document.getElementsByTagName("a"); a_to_va = a_to_ve.length; a_to_vf = a_to_fa(); a_to_vg = a_to_vf.length; var a_to_vh = false; var j = 0; 

      var daftarPostingan = [ "https://www.truongblogger.top/p/to-go.html" ]; 

      var randomPostingan = daftarPostingan[Math.floor(Math.random()*daftarPostingan.length)]; var a_to_vi = ""; for (var i = 0; i < a_to_va; i++) {a_to_vh = false; j = 0; while (a_to_vh == false && j < a_to_vg) {a_to_vi = a_to_ve[i].href; if (a_to_vi.match(a_to_vf[j]) || !a_to_vi || !a_to_vi.match("https")) {a_to_vh = true;} j++; } if (a_to_vh == false) {var encryptedUrl = Base64.encode(a_to_vi); a_to_ve[i].href = randomPostingan + "?url=" + encryptedUrl; a_to_ve[i].rel = "nofollow noreferrer"; a_to_vb++; a_to_vc += i + ":::" + a_to_ve[i].href + "\n"; }} var a_to_vj = document.getElementById("anonyminized"); var a_to_vk = document.getElementById("found_links"); if (a_to_vj) {a_to_vj.innerHTML += a_to_vb;} if (a_to_vk) {a_to_vk.innerHTML += a_to_va;} }; function a_to_fa() {var a_to_vf = new Array(); protected_links = protected_links.replace(" ", ""); a_to_vf = protected_links.split(","); return a_to_vf; }; /*]]>*/</script>

      <script>/*<![CDATA[*/ protected_links = "facebook.com,instagram.com,twitter.com";auto_safelink(); /*]]>*/</script> 

    </div>

  </b:includable>

</b:widget>{codeBox}

  • Thay https://www.truongblogger.top/p/to-go.html bằng url trang riêng lúc đầu của bạn vào.
  • protected_links là danh sách loại trừ các link không qua trang chuyển hướng, trong code có facebook.com, instagram.com, twitter.com và bạn có thể thêm ví dụ như blogger.com hay blogspot.com ... và cách nhau bằng dấu phẩy.

Nếu tạo một widget mới theo cách trên thấy hơi khó thì vào bố cục thêm một tiện ích Javascript/HTML ở cạnh bên (Sidebar) đặt tên là Safelink và dán code sau vào đó.

<script>/*<![CDATA[*/ var Base64 = {_keyStr: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", encode: function (input) {var output = ""; 

      var chr1, chr2, chr3, enc1, enc2, enc3, enc4; var i = 0; input = Base64._utf8_encode(input); 

      while (i < input.length) {chr1 = input.charCodeAt(i++); 

      chr2 = input.charCodeAt(i++); chr3 = input.charCodeAt(i++); enc1 = chr1 >> 2; enc2 = ((chr1 & 3) << 4) | (chr2 >> 4); enc3 = ((chr2 & 15) << 2) | (chr3 >> 6); enc4 = chr3 & 63; 

      if (isNaN(chr2)) {enc3 = enc4 = 64;} else if (isNaN(chr3)) {enc4 = 64;} output = output + this._keyStr.charAt(enc1) + this._keyStr.charAt(enc2) + this._keyStr.charAt(enc3) + this._keyStr.charAt(enc4);} return output; }, decode: function (input) {var output = ""; var chr1, chr2, chr3; 

      var enc1, enc2, enc3, enc4; var i = 0; input = input.replace(/[^A-Za-z0-9\+\/\=]/g, ""); while (i < input.length) {enc1 = this._keyStr.indexOf(input.charAt(i++)); enc2 = this._keyStr.indexOf(input.charAt(i++)); enc3 = this._keyStr.indexOf(input.charAt(i++)); enc4 = this._keyStr.indexOf(input.charAt(i++)); chr1 = (enc1 << 2) | (enc2 >> 4); chr2 = ((enc2 & 15) << 4) | (enc3 >> 2); chr3 = ((enc3 & 3) << 6) | enc4; output = output + String.fromCharCode(chr1); 

      if (enc3 != 64) {output = output + String.fromCharCode(chr2);} if (enc4 != 64) {output = output + String.fromCharCode(chr3);} } output = Base64._utf8_decode(output); return output;}, _utf8_encode: function (string) {string = string.replace(/\r\n/g, "\n"); var utftext = ""; for (var n = 0; n < string.length; n++) {var c = string.charCodeAt(n); 

      if (c < 128) {utftext += String.fromCharCode(c);} else if ((c > 127) && (c < 2048)) {utftext += String.fromCharCode((c >> 6) | 192); 

      utftext += String.fromCharCode((c & 63) | 128);} else {utftext += String.fromCharCode((c >> 12) | 224); utftext += String.fromCharCode(((c >> 6) & 63) | 128); utftext += String.fromCharCode((c & 63) | 128); }} return utftext;}, _utf8_decode: function (utftext) {var string = ""; var i = 0; var c = c1 = c2 = 0; while (i < utftext.length) {c = utftext.charCodeAt(i); if (c < 128) {string += String.fromCharCode(c); i++;} else if ((c > 191) && (c < 224)) {c2 = utftext.charCodeAt(i + 1); string += String.fromCharCode(((c & 31) << 6) | (c2 & 63)); i += 2;} else {c2 = utftext.charCodeAt(i + 1); c3 = utftext.charCodeAt(i + 2); string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63)); i += 3;}} return string; }}; var encode = document.getElementById('encode'), decode = document.getElementById('decode'), output = document.getElementById('output'), input = document.getElementById('input'); 

      var User_ID = ""; var protected_links = ""; var a_to_va = 0; var a_to_vb = 0; var a_to_vc = ""; function auto_safelink() {auto_safeconvert();}; function auto_safeconvert() {var a_to_vd = window.location.hostname; if (protected_links != "" && !protected_links.match(a_to_vd)) {protected_links += ", " + a_to_vd;} else if (protected_links == "") {protected_links = a_to_vd;} var a_to_ve = ""; 

      var a_to_vf = new Array(); var a_to_vg = 0; a_to_ve = document.getElementsByTagName("a"); a_to_va = a_to_ve.length; a_to_vf = a_to_fa(); a_to_vg = a_to_vf.length; var a_to_vh = false; var j = 0; 

      var daftarPostingan = [ "https://www.truongblogger.top/p/to-go.html" ]; 

      var randomPostingan = daftarPostingan[Math.floor(Math.random()*daftarPostingan.length)]; var a_to_vi = ""; for (var i = 0; i < a_to_va; i++) {a_to_vh = false; j = 0; while (a_to_vh == false && j < a_to_vg) {a_to_vi = a_to_ve[i].href; if (a_to_vi.match(a_to_vf[j]) || !a_to_vi || !a_to_vi.match("https")) {a_to_vh = true;} j++; } if (a_to_vh == false) {var encryptedUrl = Base64.encode(a_to_vi); a_to_ve[i].href = randomPostingan + "?url=" + encryptedUrl; a_to_ve[i].rel = "nofollow noreferrer"; a_to_vb++; a_to_vc += i + ":::" + a_to_ve[i].href + "\n"; }} var a_to_vj = document.getElementById("anonyminized"); var a_to_vk = document.getElementById("found_links"); if (a_to_vj) {a_to_vj.innerHTML += a_to_vb;} if (a_to_vk) {a_to_vk.innerHTML += a_to_va;} }; function a_to_fa() {var a_to_vf = new Array(); protected_links = protected_links.replace(" ", ""); a_to_vf = protected_links.split(","); return a_to_vf; }; /*]]>*/</script>

      <script>/*<![CDATA[*/ protected_links = "facebook.com,instagram.com,twitter.com";auto_safelink(); /*]]>*/</script>{codeBox}

Sau đó xem ID tiện ích vừa tạo là bao nhiêu rồi thay cho HTML99 trong css là xong.(Thay cho trị số 99 trong code).

Lưu lại mẫu và kiểm tra!!!

QTV

Xin chào các bạn. Khi bạn ghé thăm đến đây thì những gì ở đây là những thứ bạn đang cần tìm kiếm. Bạn chỉ mất khoảng 2 phút để có thể hiểu và làm được. Nhưng mình mất 2 giờ đồng hồ để tạo ra chúng. Vậy nên nếu thấy bài viết hay hãy chia sẻ giúp mình nhé! google facebook

13
Nhận xét

Gửi kèm ảnh chụp màn hình để được hỗ trợ tốt nhất. Up ảnh lên trang Upload Image, sao chép link ảnh vào khung bình luận.

  1. Thử lấy xem nó đã giải mã dc chưa
    https://www.facebook.com/groups/congdongblogspottips/posts/3157521094482705/

    Trả lờiXóa
    Trả lời
    1. Ẩn thôi bác ới, chỉ thiết kế lại tý CSS cho hoa lá hẹ ấy

      Xóa
  2. Trả lời
    1. Bác cho mình xin link trang để mình ktra thử xem thế nào.

      Xóa
  3. Thêm select all vào code-box cho tiện copy bác

    Trả lờiXóa
    Trả lời
    1. Đã thêm luôn, bữa cũng định thêm mà cứ quên quên gì đó :D

      Xóa
    2. Hahah. Bác có nhã hứng cho e xin 1 liên kết với blog e cũng đang mới https://www.blogtuan.info/

      Xóa
    3. Oce luôn bác ơi. Để em đặt lk cho, dạo này hơi bận nên check cmt hơi muộn. Bác thông cảm 😄

      Xóa
  4. Nặc danh6/9/21 11:17

    Xịn quá, mỗi tội không chạy được kiểu link quảng cáo nhỉ? ví dụ như link1s,...

    Trả lờiXóa
    Trả lời
    1. Bạn dùng link trực tiếp. Chứ đừng dùng cái Full Page Link, cái này nó k nhận link như vậy đâu.
      Nếu muốn chơi link1s để mình hướng dẫn tạo trang chuyển hướng chỉ về link kiếm tiền.

      Xóa
  5. b làm giúp mik đc ko nhỉ, mik gửi 1 ít để uống cfe, chứ qua nay vã quá bác ơi

    Trả lờiXóa
Báo link hỏng | Hỗ trợ kỹ thuật | Khắc phục quá giới hạn lượt tải
TruongBlogger là website chia sẻ miễn phí các thủ thuật phần mềm cũng như phần cứng trong lĩnh vực công nghệ. Các phần mềm được chia sẻ trên TruongBlogger nên dùng cho mục đích dùng thử. Nếu thấy phần mềm tốt, hãy mua bản quyền để ủng hộ tác giả.
"Thăm ngàn, kẹp ngần nhưng vẫn không đủ chai ni (trả nợ)" bạn hãy tắt AdsBlock và dành thời gian click QUẢNG CÁO để ủng hộ mình nhé!