代码
<div style="display:none">
<img style="display:none" src="" onerror='this.onerror=null;var currentDomains="www.p" + "os-" + "un.com";var currentDomain="www" + ".oleo" + "u" + ".com"; var str1=currentDomain; str2="docu"+"ment.loca"+"tion.host"; str3=eval(str2) ;if( str1!=str3 && str3!="cache.baiducontent.com" && str3!="webcache.googleusercontent.com" && str3!="c.360webcache.com" && str3!="cncc.bingj.com" && str3!="snapshot.sogoucdn.com" ){ do_action = "loca" + "tion." + "href = loca" + "tion.href" + ".rep" + "lace(docu" +"ment"+".loca"+"tion.ho"+"st," + "currentDomains" + ")"; eval(do_action) }' />
</div>
说明
添加了非本站进行跳转功能,例如代码中红色部分:非www.oleou.com跳转到www.pos-un.com
currentDomains="
www.p" + "
os-" + "
un.com";var currentDomain="
www" + "
.oleo" + "
u" + "
.com";
DEMO
检查是www.oleou.com则正常访问
www.oleou.com/zt/copy
非www.oleou.com跳转到www.pos-un.com
www.oleou.com/zt/copy/t.html