Just define the route as shown below in the routes.php file.
Router::connect( '/results/:val', array( 'controller' => 'Post', 'action' => 'results', ), array( 'pass' => array('val') ) );
You can set the parameters as shown below to create the link the way you want.
echo Router::url(array( 'controller' => 'Post', 'action' => 'results', 'val' => 'real', 'ext' => 'html', '?' => array('x' => '1', 'y' => '0') ));
What is displayed: results/real.html?x=1&y=0
Anil kumar
source share