Skip to content

Instantly share code, notes, and snippets.

@Cruel
Created May 30, 2012 04:02
Show Gist options
  • Save Cruel/2833666 to your computer and use it in GitHub Desktop.
Save Cruel/2833666 to your computer and use it in GitHub Desktop.
General purpose CakePHP URL slug routing
// app/Config/routes.php
Router::connect('/:controller/:id/:slug', array('action' => 'view'),
array(
'pass' => array('id', 'slug'),
'id' => '[0-9]+'
));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment