| 6 | | * Sets default routing, allowing up to 3 segments to be used: |
| 7 | | * - controller, defaults to "welcome" |
| 8 | | * - method, defaults to "index" |
| 9 | | * - id, no default |
| | 6 | * Sets default routing, allowing up to 3 segments to be used. |
| | 7 | * |
| | 8 | * $config['default'] = array |
| | 9 | * ( |
| | 10 | * // Default routing |
| | 11 | * :controller/:method/:id.xml', |
| | 12 | * |
| | 13 | * // Defaults for route keys |
| | 14 | * 'controller' => 'welcome', |
| | 15 | * 'method' => 'index', |
| | 16 | * ); |
| | 21 | * |
| | 22 | * To define a specific pattern for a key, you can use the special "regex" key: |
| | 23 | * |
| | 24 | * $config['default'] = array |
| | 25 | * ( |
| | 26 | * // Limit the controller to letters and underscores |
| | 27 | * 'regex' => array('controller' => '[a-z_]+'), |
| | 28 | * ); |
| | 29 | * |
| | 30 | * To add a prefix to any key, you can use the special "prefix" key: |
| | 31 | * |
| | 32 | * $config['admin'] = array |
| | 33 | * ( |
| | 34 | * 'admin/:controller/:method/:id', |
| | 35 | * |
| | 36 | * // Will change all controllers to admin_:controller |
| | 37 | * 'prefix' => array('controller' => 'admin_'), |
| | 38 | * ); |