Extra Light PHP Framework

URL Routing

This class is loaded automatically by the system

Content

How to add routes

In application/config/routes.php add `$routes[URI] = 'CONTROLLER/ACTION';`

You can use some wildcards as :

  • :alpha will match a segment containing only letters.
  • :num will match a segment containing only numbers.
  • :any will match a segment containing any charcater.

$routes['articles'] = 'blog/articles'; $routes['article/:any'] = 'blog/articles'; $routes['page/:num'] = 'blog/pages';