Thanks for the help. I tried this and it still gives me "This webpage has a redirect loop". Aside from doing it this way is there any other method suitable for disabling a page when user is signed in so he/she cannot go to that page when signed in?

You may need to add the option of an external source, event if it is internal, if you are getting a url.

that will be the best way. HTTP_REFERER may be or may not be set and sometimes gives you the wrong page; is not reliable so is better to be avoided. I'm also using cookies for redirect since I know for sure where I'll be redirecting to don't end up with redirect loops or 404 redirects

that will be the best way. HTTP_REFERER may be or may not be set and sometimes gives you the wrong page; is not reliable so is better to be avoided. I'm also using cookies for redirect since I know for sure where I'll be redirecting to don't end up with redirect loops or 404 redirects