View Single Post
Old 10-15-2006, 11:31 AM  
Dirty F
Too lazy to set a custom title
 
Dirty F's Avatar
 
Industry Role:
Join Date: Jul 2001
Posts: 59,204
Can someone check this code and tell me whats wrong with it?

Code:
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
var refarray = new Array();
refarray['google.com'] = "http://www.mysite.com/404.htm?from=google";
refarray['yahoo.com'] = "http://www.mysite.com/404.htm??from=yahoo";
refarray['altavista.com'] = "http://www.mysite.com/404.htm??from=altavista";
refarray['alltheweb.com'] = "http://www.mysite.com/404.htm??from=alltheweb";
refarray['msn.com'] = "http://www.mysite.com/404.htm??from=msn";
refarray['lycos.com'] = "http://www.mysite.com/404.htm??from=lycos";
refarray['infoseek.com'] = "http://www.mysite.com/404.htm??from=infoseek";
for (var i in refarray) {
if (document.referrer.indexOf(i) != -1) window.open('http://www.mysite.com/404.htm?','_top');
}
// End -->
</script>
I use it to redirect image traffic and it always worked fine. A few mins ago i decided to redirect to another url so i simply replaced the mysite part with a different url. I saved it (Wordpress) and since then the redirect completely stopped working. I can't figure out what went wrong as i didnt touch anything but the url part.
Dirty F is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote