jeudi 30 mars 2017

Rule for route and on "." or "/"

I want to configure url manager . I need if route match /deti/festival. or /deti/festival/ Yii enable Deti controller and festival action, but now for this requests yii return 404 , what's wrong? If i use option 'suffix'=>'/' rule /deti/festival/ work , but other rules don't work . What i must do ?

'urlManager'=>[
        'class' => 'yii\web\UrlManager',
        'enablePrettyUrl' => true,
        'showScriptName' => false,
        'rules'=>[
            'messages' => 'lk/default/messages',
            'students' => 'lk/student/index',
            'ulogin/ulogin' => '/reg/ulogin/ulogin',
            'ulogin/auth' => '/reg/ulogin/auth',
            'lk/anketa/auth' => '/lk/auth/auth',
            'lk/anketa/logout' => '/lk/auth/logout',
            'deti' => '/deti/deti',
            'festival'=>'/deti/deti/view?id=562',
            '/deti/festival'=>'/deti/deti/festival',
            '/deti/eco'=>'/deti/deti/eco',
            '/deti/festival[.\/]?'=>'/deti/deti/festival',
            '/deti/eco/'=>'/deti/deti/eco',
            '/profile/exhview.php'=>'/exhibitions/default/old',
            '/profile/user.php'=>'/profile/profile/old'
        ]
    ]




Aucun commentaire:

Enregistrer un commentaire