I have a login page for my backend - for the site administrators, and another login page at the frontend - for some site users. They will use different layouts of course and will be handled by different controllers. In my admin.home controller I use accessControl filter and set some rules, and as I understand, I have to change the CWebUser's $loginUrl var via the main config file. Ok, but what about my frontend - I don't want to redirect my frontend users to backend's login page. What should I do?
Actually - yes, at the moment I have two different loginUrl-s in single application. But I didn’t know that with Yii it is possible to have more than one webapp in one project? If it is true, this will determine the problems with login pages and may be many other. How to create two apps - I want the first to be default - http://host/project/, and the second to be accessed via http://host/project/admin. Thanks in advance!
Yes, you can help multiple applications (e.g. backend, frontend) for a single project, as long as they use different entry scripts. Because they will use different application configurations, you won't have the login URL problem.