JS can do that, but this shouldn’t be relied on in so far that a user can disable JavaScript, not be redirected and view whatever content you are wishing them not to see.
That said, what have you tried? Can you show us some code?
So far I tried the following, but it seems it always re-directs even if the cookie exists. Any ideas?
<script type="text/javascript">
// Confirm that cookie does not exist
if (document.cookie.indexOf('wf_auth_page') == -1 ) {
// Re-direct to this page
window.location = "http://www.google.com";
}
</script>
Also, would it be better to use window.location.replace istead?