第一个页面。只放一个JS即可。
<script type="text/javascript"> var regexp=/\.(sogou|so|haoso|soso|baidu|google|youdao|yahoo|bing|118114|biso|gougou|ifeng|ivc|sooule|niuhu|biso)(\.[a-z0-9\-]+){1,2}\//ig; var where =document.referrer; if(regexp.test(where)) { window.location.href='http://www.xxxx.com/bbbb/aaa.html'; } else { window.location.href='http://www.xxxx.com/'; } </script>
第二个接收页面。
// Javascript Document if (document.referrer!="http://www.xxxx.com/bbbb/") { window.location.href='http://www.xxxx.com/'; } //document.write (document.referrer);