How to convert url when submitting the form?

There is a link of the form site.ru/site/search?make=1&model=2with the help of its rules of routing was able to convert the link to this form site.ru/search/audi/a100 it's all good.
After I was happy created a form for search and then came the problem, when you submit the form, a get request on the link site.ru/site/search + get the options for the selected users in the fields make and model I get a link site.ru/site/search?make=1&model=2.

If you just paste the link so, I got what I needed:
<a href="<?=Url::to(['/site/search', 'make' => 1, 'model' => 2])?>"></a>

But if the request is sent with the same get parameters through the form, the url is not converted
<form action="<?=Url::to(['/site/search'])?>" method="GET">
 <select name="make">
 <option value="1">Audi</option>
</select>
 <select name="model">
 <option value="2">A 100</option>
</select>
</form>


The question of how to deal with these? What solutions are there?
Read about the solution that link to form in js and when you click on the search button to link to done in js? but is there no other solution?
June 5th 19 at 21:01
1 answer
June 5th 19 at 21:03
Solution
ajax
Thanks, did that, hung js in the beforeSubmit event on the form and sends an ajax request to some action which is a link and return that link and go through it. - Ned.Ve commented on June 5th 19 at 21:06

Find more questions by tags Yii