loginUrl issue

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?

Thanks in advance for any help!

Do you mean you have two login pages in a single application?

If you front-end and back-end are two separate applications, do you still have the problem?

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!

I think I got it - I used

yiic webapp dummyproject
and after that
yiic webapp dummyproject/admin

I hope there will be no collisions when I access http://host/dummyproject/some/route and http://host/dummypro...in/other/route

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.