Custom Redirect Blogger " Error 404 " (Page Not Found) To Homepage

 

Halaman 'Error 404' akan terpapar apabila link/url sesuatu halaman tidak dijumpai pada blog anda. Jadi akan muncul halaman seperti gambar diatas yang memaparkan  " Sorry, the page you were looking for in this blog does not exist. " . Sebenarnya anda boleh custom halaman tersebut mengikut kreativiti anda. Disini saya akan tunjukkan cara untuk tambah fungsi redirect ke halaman utama blog apabila berlaku ' Error 404 ' ini.

1. Pada Dashboard blogger anda, klik Settings > Search preferences > Custom Page Not Found (Klik Edit).

2. Copy (CTRL+C) kod dibawah:
Sorry, the page you're looking for in this blog does not exist.
You will be redirected to homepage shortly.
<script type = "text/javascript">
BSPNF_redirect = setTimeout(function() {
location.pathname= "/"
}, 5000);
</script>
3. Paste (CTRL+V) kod diatas pada ruang " Custom Page Not Found " , 
4. Klik Save changes dan lihat hasilnya.

1 suara diterima...:

assalamualaikum.. jenjalan sini,. tertarik dgn entry ni.. yg ni utk wordpress ke ? sbb amal ada 5k++ 400 error ni.. amal baru transfer blogspot kepada wordpress.. kalau sudi bgtau amal dkt blog, kalau dah balas komen, takut tak perasan..

amal follow sini.. jemput singgah dan komen blog amal kalau sudi :)
http://cikamal.com/contest-seo-eridy-5.html

JIKA ADA SEBARANG MASALAH ATAU PERMINTAAN TUTORIAL SILA TINGGALKAN KOMEN K.. TERIMA KASIH ATAS KUNJUNGAN ANDA..