S
S
Space2015-09-16 10:29:40
Yii
Space, 2015-09-16 10:29:40

How to set up CNC in Yii2?

I used to set it up, everything worked out, now it doesn’t want to, it gives out 404, if so:

'urlManager' => [
            'showScriptName' => false,
            'enablePrettyUrl' => true,
             'enableStrictParsing' => true,
            'rules' => array(
                '<action>' => 'site/<action>',
            ),
        ],

.htaccess:
RewriteEngine On RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule . index.php

, but if 'showScriptName' => true, then it works, but the script name is displayed in the path. If this is removed, then when you click on any link, the contents of the main page will be displayed:
'enableStrictParsing' => true,
            'rules' => array(
                '<action>' => 'site/<action>',
            ),

What could be wrong?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Marcuzy, 2015-09-16
@Marcuzy

Look here koi-notes.blogspot.ru/2015/02/yii2-ubuntu-apache-2...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question