http://www.yiiframework.com/doc/cookbook/63/

http://www.yiiframework.com/doc/cookbook/63/ (This structure build two app)

How can I create url from backend app to frontend app (with function createUrl() or something else)?

In this case frontend is a different application, so you can’t use it’s url rules. Maybe you should create a new method “createFrontendUrl” which will grab rules from the frontend config, but it’s just thoughts, I haven’t faced this problem before.

Or if your backend url is "http://mysite/backend" you can add all rules into the main config:




'urlManager'=>array(

    'urlFormat'=>'path',

    'showScriptName'=>false,

    'rules'=>array(

        // frontend

        'contacts'=>'site/contacts',

        // backend

        'backend/news'=>'news',

    ),

),



But now you’ll be able to create urls from frontend to backend. If you have many backend rules, it can slow down frontend performance. If so, then in your backend config you can extract frontend rules and merge both (which is a little bit harder :) ).

Thank you for replay