redirect to admin page after login

Hi in my frontend login page,if the user successfully login and if the role is A for admin I want to redirect this to the backend,I tried to redirect but it gives me wrong url

 return $this->redirect('yiiback/adminsite');

it give me this url


Thank you in advance.


There is a solution following, you can refer:

  • Using RBAC function to get Role as your request.

  • After get Role name, you can base on it to redirect to necessary url.

Good luck.