Answer the question
In order to leave comments, you need to log in
Why don't other actions besides index work?
Hello!
I go to the main page with the Site controller, actionIndex, everything works, as soon as I go to another page with any other action in the Site controller, a 404 empty page is displayed. The urlManager is written in the config like this:
'urlManager' => [
'enablePrettyUrl' => true,
'showScriptName' => false,
'enableStrictParsing' => true,
'rules' => require(__DIR__ . '/routes.php'),
],
<?php
return [
'<action>'=>'site/<action>',
'company/<action>'=>'company/<action>',
'moderation/<action>'=>'moderation/<action>',
'login'=>'site/login',
'logout'=>'site/logout',
'moderation/user/emailsort'=>'moderation/user-emailsort',
'moderation/reviews/deleted'=>'moderation/reviews-deleted',
'moderation/reviews/approved'=>'moderation/reviews-approved',
'moderation/queries/approved'=>'moderation/queries-approved',
'' => 'site/index'
];
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question