WordPress.org

Ready to get started?Download WordPress

Forums

Groups 404 Redirect
Redirect 404 modification... (1 post)

  1. uwew
    Member
    Posted 10 months ago #

    Hey there,

    I needed to extend the Redirect 404 functionality and I wonder if it where possible to maybe build up on my hack and/or add it to the permanent codebase so I don't have to keep track of it:)

    I basically ran into following requirement with my site: a 404 redirect for users that are not logged in and basically copy/paste a link to a page/post and another redirect for users "snooping around" and trying to get into areas that are "protected" with your group plugin.

    I edited the groups-404-redirect.php adding following line(s) (around line 336)

    if ((get_current_user_id()) == 0) {
      wp_redirect( wp_login_url( $current_url ), $redirect_status );
      exit;
    }

    This basically just checks if the user is not logged in and if so redirect him/her to the login page rather then the page specified in the options...

    Hope this all makes sense and might be useful to some other users.

    Cheers,

    - Uwe

    http://wordpress.org/plugins/groups-404-redirect/

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.