1

I'm trying to redirect users to a particular page after they have logged in.

login url example is

http://mysite.com

when they log in i want to redirect them to:

http://mysite.com/home

but when they navigate to

http://mysite.com

they will be automatically redirected back to

http://mysite.com/home

but only when they are logged in

1

A simple way to do this might be to publish a module with no title in the debug position, and set it to only show for registered users. In it, you can put a javascript redirect like the one found here:

https://stackoverflow.com/questions/4744751/how-do-i-redirect-with-javascript

Set Publish it on the page you want to redirect FROM and make it redirect to the page you want it to redirect TO.

Depending on what text editor you're using, you might have to disable the editor to put the code in, and then save the module. If you're using JCE, you can set JCE to allow script without it removing the script when you save.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.