Divi WordPress Theme
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

WordPress fix redirect if logged in

Discussion in 'Misc WordPress Requests' started by andrew55, Jan 13, 2018.

  1. andrew55

    Guest

    redirect if logged in, by andrew55

    I need to create a condition so that when a user is not logged in, they remain on a page. But, when use is logged in, they get redirected to another page. I have this:

    RewriteCond %{HTTP_COOKIE} wordpress_logged_in.*
    RewriteRule /stay-if-not-logged/ /go-here-if-logged/

    Is this the correct redirect rule? It doesn’t seem to work for me.

    Also, will this work if caching plugins are enabled, like W3TC?

    Thanks for any clarification.

    redirect if logged in
     
    #1

Share This Page

Monarch Social Sharing Plugin