用js实现判断当前来路
<script type="text/javascript">
if(self!=top){top.location=self.location;}
var ref=document.referrer;
var domains=new Array("jb51.net/","jb51.cn/","jb51.com.cn/");
var refpass=false;
for(i=0;i<=domains.length;i++){if(ref.indexOf(domains[i])>0){refpass=true;break;}}
if(ref==""){refpass=true}
if(!refpass){window.location.href='http://www.jb51.net';}
</script>