Gridview - Pjax With Paging Urls

Hi everybody!

I have used Gridview with Pjax very good,but i’m facing with unfriendly url.

My gridview is in mydomain.com/shop view.The view runs the first time it is mydomain.com/shop.

But when i click paging button next or prev it show url as mydomain.com/shop?page=2&per-page=3.

I only want it is always as mydomain.com/shop.

In yii1 this don’t happen,it is always friendly url with ajax and no adding ?page=2&per-page=3.

Do this need custom url in rules or an other way?

Anybody have any ideas this ? Thanks.

This is an expected behavior with PJAX. It will overwrite the address bar with the generated URL (which is an expected experience from this functionality).

If you do not need this… you may want to use normal ajax OR alternatively use something like iframes.

Hi Kartik V!

Thank you for your relpy!

I still want use Gridview with Pjax.

But i don’t understand how to leave unfriendly url.

Could you please to detail more this?