Yii2 pretty url violated GridView search

I have a link without urlManager when searching in a GridView :

 project/backend/web/index.php?CountrySearch%5Bid%5D=1&CountrySearch%5Bname%5D=&r=country%2Findex 

When I turn on urlManager , I can’t search the GridView , I think that is because I need to change the rules.

Now my url looks like this: project/country/index Can someone help me with the rules, so a search in the GridView could work?

+4
source share
1 answer

Does your configuration match the following LOC?

 'urlManager' => [ 'class'=>'yii\web\UrlManager', 'enablePrettyUrl' => true, 'showScriptName' => false, ], 
0
source

All Articles