Login Redirect page dependable on page it came from

This topic contains 10 replies, has 2 voices, and was last updated by  webalot 4 years, 2 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #7339

    webalot
    Free User
    Post count: 12

    Hi,

    Is it possible to make the login redirect page dependable on the original link by which the login page was triggered?
    I have multiple links to different pages, for which the user has to be logged in.
    After the login, i can only set one redirect page, but off course that is not the same page for the different original links.

    I hope you can help again, just like the wonderful solution you gave me with my previous support question.

    Regards,
    Marcel

    #7340

    Alex Rollin
    Moderator
    Post count: 27815

    Yes, in the registration redirect set it to ‘last page visited’. This only works if you have autoapprove + autologin set.

    #7342

    webalot
    Free User
    Post count: 12

    Hi Alex,

    That is for the registration page, but not for the login page if someone is allready registered. There is also the same option, but after login it goes backj to the page it came from. If like the link is on the homepage to a certain page for which a login is required, after login it goes backj to the home page again and not to the page it should have gone to.

    #7352

    Alex Rollin
    Moderator
    Post count: 27815

    You can pass a redirect_to

    So, if you have a link on a page, to login, then you can add the redirect_to and the user will be sent back to the page you specify.

    You can see the format when you are using your registration form.

    #7365

    webalot
    Free User
    Post count: 12

    Hi Alex,

    I saw the redirect_to already, but that’s only one config.
    That’s exactly my problem, because i have more links that link to different pages, not just the one.

    Regards,
    Marcel

    #7366

    Alex Rollin
    Moderator
    Post count: 27815

    You can add a custom redirect to any link that points to a login form.

    #7367

    webalot
    Free User
    Post count: 12

    Okay, so i link to a certain page (that is not the login form).
    That page can’t be viewed by not logged in users, so the login page comes up.
    After that, when the user logged in, it should go to the page that was originally linked to.
    How do i pass the custom redirect, is that in the original link and if so, can you explain me how, or is it documented somewhere?

    Thank you for your quick responses and help in this matter.

    #7382

    Alex Rollin
    Moderator
    Post count: 27815

    Create a new link like https://mycustom.com/register(or login)/?redirect_to=https://mycustom.com/link

    Encode the link with https://www.w3schools.com/tags/ref_urlencode.asp

    Copy the newly encoded URL and place it on your site.

    #7390

    webalot
    Free User
    Post count: 12

    That’s it!
    Thank you very much, this is exactly what i needed!

    Much regards,
    Marcel

    #7391

    Alex Rollin
    Moderator
    Post count: 27815

    Excellent!

    #7392

    webalot
    Free User
    Post count: 12

    No … YOU are Excellent 😀

Viewing 11 posts - 1 through 11 (of 11 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket