I have tried to modify my routes in app/config/routes.php.
I have urls like this: http://example.com/controller/action/params I would like urls like this: http://example.com/controller/params
here is my route I have built as I understand it:
Router::connect('/services/:slug',
array('controller' => 'services', 'action' => 'view'),
array('pass' => array('slug')));
and here is my link in my index.ctp file for services:
echo $this->Html->link(
__($service['Service']['title'], true),
array('controller' => 'services', 'action' => 'view', service['Service']'slug'])
);
If it helps, here is my view function from the services controller:
function view($slug) {
$service = $this->Service->findBySlug($slug);
$this->set('service', $service);
}