D
D
Denis Shevchenko2017-04-01 01:43:47
Yii
Denis Shevchenko, 2017-04-01 01:43:47

Is it possible to make such yii2 route rules?

Good evening, I am transferring the old site to yii2. The site has articles and categories of articles (both articles and categories have their own seo url), on the old site the url of these articles looks like site.ru/category_url/page_url , and the categories have site.ru/category_url. Is it possible to do the same in yii2 with routing without creating new entries for each category?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alex Bond, 2017-04-01
@densisss

Can. Like this:

"<category>"=>"site/category",
"<category>/<page>"=>"site/page",

In actions, respectively, check the data that the channels will put in GET

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question