I know that my question title sounds like duplicate but it's not. Our project is multi-lingual. I have listing page on this page cakephp pagination is applied. But the link on pagination number is :
http://example.com/controller/action?language=en&page=8
I've implemented routing to disappear action, using below mentioned routing code:
$routes->connect('/controller',
['language' => 'en', 'controller' => 'controller', 'action' => 'action']
);
so now it is :
http://example.com/controller?language=en&page=8
But my requirement is like this
http://example.com/controller?page=8
To achieve my goal, I have implemented this code
$routes->connect('/controller/:page',
['language' => 'en', 'controller' => 'controller', 'action' => 'action'], ['page' => "(?page:'[0-9]+]')"]
);
Thanks in advance.