There are couple of ways to set up config/routes.php, the suitability depends on your requirements.
-
Route for each page, if you have just a couple of pages that you want to route:
$route['Planning'] = 'content/index/6';
$route['Working'] = 'content/index/7';
// etc.
-
You can use fallback url, that will match after all other route rules - that means you must set rules that might match this rule before the fallback rule. It also means you loose ID, and have to query database based on the title:
$route['register'] = 'register'; // this would match the fallback rule
$route['([a-z-A-Z1-9_]+)'] = 'content/index/$1'; // letters, numbers and underscore
// you'll receive "Planning" as parameter to Content::index method
-
Or you can have policy that all urls to content must start with capital letter, in that case you don't have to worry about other route rules
$route['([A-Z]{1}[a-z-A-Z1-9_]+)'] = 'content/index/$1';
// again, you'll receive "Planning" as parameter to Content::index method
-
You still want the numerical ID, so you don't have to change the controller/model:
$route['(\d+)/[a-z-A-Z1-9_]+'] = 'content/index/$1';
// routes now look uglier: http://domain.com/6/Planning