Skip to content

Instantly share code, notes, and snippets.

@v9n
Created March 27, 2011 08:36
Show Gist options
  • Select an option

  • Save v9n/889046 to your computer and use it in GitHub Desktop.

Select an option

Save v9n/889046 to your computer and use it in GitHub Desktop.
<?php
Route::set('profile', '<username>', array('username' => '([a-zA-Z0-9\-_\.]+)') )
->defaults(array(
'controller' => 'profile',
'action' => 'index'
));
Route::set('default', '(<controller>(/<action>))')
->defaults(array(
'controller' => 'welcome',
'action' => 'index',
));
// Error
Route::set('error', 'error(/<path>)', array('path' => '.+'))
->defaults(array(
'controller' => 'error',
'action' => '404',
'id' => FALSE,
));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment