WordPress.org

Ready to get started?Download WordPress

Forums

Peter's Login Redirect
Feature Request - Redirect to Current Page (12 posts)

  1. jsigned
    Member
    Posted 1 year ago #

    I'd like to request a feature to be added to redirect to the current page. I've read the replies at http://www.theblog.ca/wplogin-redirect#comment-11089 and for this newb you may as well be speaking Martian for all the sense it makes to me.

    I am using SimpleModal Login which only makes sense to leave the user on the sign in page. Based on the number of times this request has been made the maybe others willing to kick in a few $$ to make it happen.

    http://wordpress.org/extend/plugins/peters-login-redirect/

  2. lutechi
    Member
    Posted 1 year ago #

    I am on the same boat, I found SimpleModal to be so nice while testing but can not put it on the production site because of the redirect problem.

    This feature would be nice.

  3. Peter
    Member
    Plugin Author

    Posted 1 year ago #

    Version 2.6.0 of the plugin now supports [variable]http_referer[/variable] as a redirect URL in order to redirect the user back to the same page. Please see the note in the changelog (http://wordpress.org/extend/plugins/peters-login-redirect/changelog/) or implement one of the other suggested solutions if you need to support more than the basic use case.

  4. karlcw
    Member
    Posted 1 year ago #

    Hi Peter,
    Tried your suggestion and redirect to same page doesn't seem to work for me. I suspect I'm missing something.

    Can you give me the exact syntax to put in the URL box for this please?

    Thanks
    Karl

  5. Peter
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Karl,

    Exact syntax for the URL box is essentially this:

    [variable]http_referer[/variable]

    Are you having trouble with referrer redirecting only or with any redirects?

  6. karlcw
    Member
    Posted 1 year ago #

    Hi Peter,

    tried that but it goes to 404 for the page /http_referer

    This is the only thing I need to resolve, not tested the plugin trying to do anything else.

  7. Peter
    Member
    Plugin Author

    Posted 1 year ago #

    The only possible causes that come to mind on that are either: your version of the plugin is older than 2.6.0 (in which case be sure to upgrade!); or that you need to include the opening and closing "[variable]" tags.

  8. pjv
    Member
    Posted 1 year ago #

    hi peter,

    sorry if this is dense, but are you saying to paste literally [variable]http_referer[/variable] into the URL box?

    or are we supposed to substitute something arbitrary where it says "variable"?

    when i tried pasting the exact string above and then clicked the update button, the plugin gave me the alert "Successfully updated URL for "all other users"", but the string in the URL box changed to variablehttp_referer/variable - note lack of brackets, and the redirect went to a 404.

  9. pjv
    Member
    Posted 1 year ago #

    i went into the db directly and changed the string in there to [variable]http_referer[/variable] and then it kind of worked.

    logout is working perfectly, leaving me logged out on the same page where i clicked the logout link.

    login is still not working for me even with the fixed URL string. no matter what page i login from, it tries to redirect to me to http://mysite/wordpress/ which is a 404.

    i think it might be because my admin and my login form are on a different subdomain (accessed via SSL) than the referer page and i am also using another plugin, "wordpress HTTPS" to manage those redirects.

  10. pjv
    Member
    Posted 1 year ago #

    fixed my final issue above by turning on the option in the redirect plugin to "Allow a POST or GET "redirect_to" variable to take redirect precedence" and then re-writing the code that generates my login link to look like:

    <a title="Login" href="'. wp_login_url($_SERVER["REQUEST_URI"]) .'">Login</a></li></ul>';

    SO... the only thing left unsolved in my posts in this thread is why the plugin would not save the [variable]http_referer[/variable] string with the brackets when i tried to do that and i had to go into the db directly to save that string.

  11. Peter
    Member
    Plugin Author

    Posted 1 year ago #

    Thanks for the updates. Try setting "Redirect restrictions" to "Any http or https URL"

  12. pjv
    Member
    Posted 1 year ago #

    yup, thanks. had that setting.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.