CGridView generates wrong url for filter ajax requests

Hi, guys!

Had the same problem, solved by fixing the action.

$model = new User('search');


if (isset($_GET['User'])){



  if (!empty($arr['User'])) $_GET['User']=$arr['User'];



It allows to get the filter attributes directly from the URL, not from $_GET array formed by YII with ‘path’ urlManager rules.

Simply change the config/main.php

add the following line to url manager


I have the same problem, because my GridView is generated by an action in Controller. And the GridView takes the URL of the action from controller…

Thx to chuletero,

my problem is solved and running well.


Adding the module name also is not working for me on Nginx Server. While it is working fine on apache in every case.

‘ModuleName/<controller:\w+>/<action:\w+>’ => ‘ModuleName/<controller>/<action>’

perfect, this worked well, in fact other modules were working because they were included in the main.php but not a particular module with whom i had issue