这个代码能够直接保护整个站,而不再是单个页面,直接把代码放到自己的网站上,如果是博客建议放到header.php头部文件,如果是单页面直接放到首页即可!
var a = 'retrtrfdcfvvvv';var ym = window.location;var ym2 = 'wdzzz.com'; var ym3 = String(ym);function suan(a{var re = a.substring(0,2); var tr = a.substring(2,4); var tr2 = a.substring(4,6); var fd = a.substring(6,8); var cf = a.substring(8,10); var vv = a.substring(10,12); var vv2 = a.substring(12,14); re = 'h';tr = 't';tr2 ='t'; fd = 'p';cf = ':';vv = '/'; vv2 = '/';var p = re+tr+tr2+fd+cf+vv+vv2;return p;}if (ym3.indexOf(ym2) == -1 ) {alert(ym2); var b = suan(a) + 'wdzzz.com' + '/'; window.location = b;}