Redirect the user after login to a specific URL not set in the login form

created

For any login menu item, you can define the URL to which a user is redirected after successfully logging in. You can also override that redirect with a little elbow grease and a parameter that you add to any link to that login form. This is particularly helpful if you wish to link to the login page from, say, an Event with registered only tickets and then redirect the user back to the Event after successful login.

To do so, you'll need to use a base64 encoded version of the URL to which you wish to redirect the user. You can encode this by using free online resources like this where you'll enter in the entire URL starting with "http://..." or "https://...":

https://www.base64encode.org/

Once you have the encoded version of the URL, you add it as the ?return= parameter to the link to your login form like this:

http://www.myorg.org/my-login-form?return=aHR0cDovL3d3dy5teW9yZy5vcmcvdGhpcy1pcy1teS11cmw=

Make sure to include the final = sign or signs, if there are any!

Have more questions? Submit a request
Article is closed for comments.