We are moving our forum in GitHub Discussions. For questions about Phalcon v3/v4 you can visit here and for Phalcon v5 here.

[SOLVED] Redirect to index after login

Hello, I need help with some routing I can not find how to make. My site is local.mysite.com, after login I need it to show the address as local.mysite.com/user1. How can I achieve this?

Thanks.



5.1k
Accepted
answer

You can use the dispatcher to forward the current action but this doesn't changes the uri. If you really want to redirect the user, use : "$this->response->redirect('/user1');" in your controller



18.9k

Thanks cylessia, "$this->response->redirect('user1');" did the trick :D