M
M
Maxim Lagoysky2017-04-18 11:22:02
Yii
Maxim Lagoysky, 2017-04-18 11:22:02

urlManager problem in yii2?

I have 2 links on one page
1) http://mysite.com/site/sub?al=villas-and-houses&id=1
2) http://mysite.com/site/search?al=house&id=1
if you write
'rules' => [
'' => 'site/sub'
'' => 'site/search'
] in
the rules, then when you click on site/search, the work site/sub is performed, as I understand it, because site /sub comes first in the rule and it executes it? how to fix better?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Timofeev, 2017-04-18
@lagoy

Can't be the same on the left. It makes no sense, only one will work. It is difficult to understand what you want to get, but if you remove the rules at all, it will apparently work as you need.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question