needed the regex flag
checks to see that we are not on the page we are redirecting to