Support » Fixing WordPress » redirect if logged in

  • 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.

Viewing 2 replies - 1 through 2 (of 2 total)
  • I have used the redirection plugin for a similar issue. In my case, you needed to be logged into to have access to the ‘download’ link. The plugin worked well.

    Have you tried that?

    @kazlisak – I appreciate your suggestion. I’ve seen and used that plugin before.

    I’m just trying to avoid installing MORE PLUGINS for a simple task. I only have 3 pages I need to redirect for logged in users, so I’d much rather figure out a simple .htaccess redirect.

    Thank you for any suggestions on how to properly use the included .htaccess redirect.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘redirect if logged in’ is closed to new replies.