Answer the question
In order to leave comments, you need to log in
YII2. Why does cnc work clumsily?
Set up the CNC:
'rules' => [
[
'class' => 'yii\web\GroupUrlRule',
'routePrefix' => 'category',
'rules' => [
'category-<alias:\w+>' => 'view',
],
],
]
https://mysite.ru/category-kurtki
https://mysite.ru/category/view?alias=kostymi
https://mysite.ru/category/view?alias=kostymi
https://mysite.ru/category-kostymi
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