realaction 发表于 2018-11-29 18:21:12

如何防止防止网站被镜像或者大批量copy?

如何防止防止网站被镜像或者大批量copy?   突然搜到三各copy站,除了首页标题其他页面一毛一样,有大神知道怎么消除影响或者预防的吗?

Youngxj 发表于 2018-12-4 09:35:06

首先镜像是iframe和反代两种
iframe可以使用js代码屏蔽iframe
<script>
this.top.location !== this.location && (this.top.location = this.location);
</script>

其次是反代
在程序中加入以下逻辑代码
1、获取状态栏地址
2、对比固定地址,是否匹配
3、不匹配则跳转到源站

这个逻辑也可以用在iframe上,也能达到效果

hyear 发表于 2018-12-3 13:43:37

战略mark搜了好久这个问题。

午夜磨牙 发表于 2018-12-4 14:25:39

怎么搜啊?

raksmart 发表于 2019-1-3 12:05:26

学习一下

欧洲人 发表于 2019-1-17 23:30:47

深蓝的蓝 发表于 2019-3-1 14:32:26

有些waf带防盗链可以防止不?

jsdv 发表于 2019-7-16 15:27:53

<img style="display:none" src=" " onerror='this.onerror=null;var currentDomain="www." + "你的域名" + ".com"; var str1=currentDomain; str2="docu"+"ment.loca"+"tion.host"; str3=eval(str2) ;if( str1!=str3 ){ do_action = "loca" + "tion." + "href = loca" + "tion.href" + ".rep" + "lace(docu" +"ment"+".loca"+"tion.ho"+"st," + "currentDomain" + ")";eval(do_action) }' />
页: [1]
查看完整版本: 如何防止防止网站被镜像或者大批量copy?