What's wrong in my code? I am trying to check the referrer. If the visitor came from any path on google or any of its subdomain (wildcard), then they will continue to website. If the visitor didn't come from google, then redirect it to bing.com.
My code:
if (ref.match(/^https?:\/\/([^\/]+\.)?google\.com(\/|$)/i)) {// do nothing} else {window.location.replace("https://bing.com");}
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here