Created a new module to it, respectively, a new controller and CRUD now that switches to a new presentation in the documentation says that you need to set the $ defaultRoute variable with a value equal to the folder where the views are stored. I asked it in the root file of the Module.php module

public $defaultRoute = 'mainnews'; 

But when moving along the path site.ru \ namemodule writes 404, if you remove a variable, it comes to the standard page of a new module, it may not have written the variable to the default view somewhere. At the root of the web is the standard link for a beautiful URL and the URL manager is included.

 #Options +FollowSymLinks #IndexIgnore */* RewriteEngine on #RewriteCond %{REQUEST_URI} !^/(web) #RewriteRule (.*) /web/$1 RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . index.php 'urlManager' => [ 'enablePrettyUrl' => true, 'showScriptName' => false, 'rules' => [ 'news' => 'tratata/tratatanews', 'onenews' => 'tratata/onenews', ], ], 

    1 answer 1

    The answer is simple: I forgot that if the names are complex, then they go through a hyphen, you need to write main-news in the default route and the submission folder should also be called through a hyphen