darwinel | d8bef8a | 2014-02-11 20:13:22 +0100 | [diff] [blame] | 1 | <?php |
Derek Jones | f4a4bd8 | 2011-10-20 12:18:42 -0500 | [diff] [blame] | 2 | /** |
| 3 | * CodeIgniter |
| 4 | * |
Phil Sturgeon | 07c1ac8 | 2012-03-09 17:03:37 +0000 | [diff] [blame] | 5 | * An open source application development framework for PHP 5.2.4 or newer |
Derek Jones | f4a4bd8 | 2011-10-20 12:18:42 -0500 | [diff] [blame] | 6 | * |
Andrey Andreev | bdb96ca | 2014-10-28 00:13:31 +0200 | [diff] [blame] | 7 | * This content is released under the MIT License (MIT) |
Andrey Andreev | e734b38 | 2012-03-26 13:42:36 +0300 | [diff] [blame] | 8 | * |
Andrey Andreev | bdb96ca | 2014-10-28 00:13:31 +0200 | [diff] [blame] | 9 | * Copyright (c) 2014, British Columbia Institute of Technology |
Andrey Andreev | e734b38 | 2012-03-26 13:42:36 +0300 | [diff] [blame] | 10 | * |
Andrey Andreev | bdb96ca | 2014-10-28 00:13:31 +0200 | [diff] [blame] | 11 | * Permission is hereby granted, free of charge, to any person obtaining a copy |
| 12 | * of this software and associated documentation files (the "Software"), to deal |
| 13 | * in the Software without restriction, including without limitation the rights |
| 14 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
| 15 | * copies of the Software, and to permit persons to whom the Software is |
| 16 | * furnished to do so, subject to the following conditions: |
Derek Jones | f4a4bd8 | 2011-10-20 12:18:42 -0500 | [diff] [blame] | 17 | * |
Andrey Andreev | bdb96ca | 2014-10-28 00:13:31 +0200 | [diff] [blame] | 18 | * The above copyright notice and this permission notice shall be included in |
| 19 | * all copies or substantial portions of the Software. |
| 20 | * |
| 21 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 22 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 23 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
| 24 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 25 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
| 26 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
| 27 | * THE SOFTWARE. |
| 28 | * |
| 29 | * @package CodeIgniter |
| 30 | * @author EllisLab Dev Team |
darwinel | 871754a | 2014-02-11 17:34:57 +0100 | [diff] [blame] | 31 | * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) |
Andrey Andreev | bdb96ca | 2014-10-28 00:13:31 +0200 | [diff] [blame] | 32 | * @copyright Copyright (c) 2014, British Columbia Institute of Technology (http://bcit.ca/) |
| 33 | * @license http://opensource.org/licenses/MIT MIT License |
| 34 | * @link http://codeigniter.com |
| 35 | * @since Version 1.0.0 |
Derek Jones | f4a4bd8 | 2011-10-20 12:18:42 -0500 | [diff] [blame] | 36 | * @filesource |
| 37 | */ |
darwinel | d8bef8a | 2014-02-11 20:13:22 +0100 | [diff] [blame] | 38 | defined('BASEPATH') OR exit('No direct script access allowed'); |
Derek Jones | f4a4bd8 | 2011-10-20 12:18:42 -0500 | [diff] [blame] | 39 | |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 40 | /* |
| 41 | | ------------------------------------------------------------------------- |
| 42 | | URI ROUTING |
| 43 | | ------------------------------------------------------------------------- |
| 44 | | This file lets you re-map URI requests to specific controller functions. |
| 45 | | |
| 46 | | Typically there is a one-to-one relationship between a URL string |
| 47 | | and its corresponding controller class/method. The segments in a |
| 48 | | URL normally follow this pattern: |
| 49 | | |
Barry Mieny | dd67197 | 2010-10-04 16:33:58 +0200 | [diff] [blame] | 50 | | example.com/class/method/id/ |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 51 | | |
| 52 | | In some instances, however, you may want to remap this relationship |
| 53 | | so that a different class/function is called than the one |
| 54 | | corresponding to the URL. |
| 55 | | |
| 56 | | Please see the user guide for complete details: |
| 57 | | |
| 58 | | http://codeigniter.com/user_guide/general/routing.html |
| 59 | | |
| 60 | | ------------------------------------------------------------------------- |
| 61 | | RESERVED ROUTES |
| 62 | | ------------------------------------------------------------------------- |
| 63 | | |
Andrey Andreev | 08fec7b | 2013-07-19 16:25:51 +0300 | [diff] [blame] | 64 | | There are three reserved routes: |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 65 | | |
| 66 | | $route['default_controller'] = 'welcome'; |
| 67 | | |
| 68 | | This route indicates which controller class should be loaded if the |
| 69 | | URI contains no data. In the above example, the "welcome" class |
| 70 | | would be loaded. |
Phil Sturgeon | 23174a6 | 2010-12-15 15:18:16 +0000 | [diff] [blame] | 71 | | |
| 72 | | $route['404_override'] = 'errors/page_missing'; |
| 73 | | |
Andrey Andreev | 51b7acd | 2012-10-29 16:23:13 +0200 | [diff] [blame] | 74 | | This route will tell the Router which controller/method to use if those |
| 75 | | provided in the URL cannot be matched to a valid route. |
Phil Sturgeon | 23174a6 | 2010-12-15 15:18:16 +0000 | [diff] [blame] | 76 | | |
Andrey Andreev | 08fec7b | 2013-07-19 16:25:51 +0300 | [diff] [blame] | 77 | | $route['translate_uri_dashes'] = FALSE; |
| 78 | | |
| 79 | | This is not exactly a route, but allows you to automatically route |
| 80 | | controller and method names that contain dashes. '-' isn't a valid |
| 81 | | class or method name character, so it requires translation. |
| 82 | | When you set this option to TRUE, it will replace ALL dashes in the |
| 83 | | controller and method URI segments. |
| 84 | | |
| 85 | | Examples: my-controller/index -> my_controller/index |
| 86 | | my-controller/my-method -> my_controller/my_method |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 87 | */ |
Alex Bilbie | 1ef1919 | 2012-05-17 20:41:12 +0100 | [diff] [blame] | 88 | $route['default_controller'] = 'welcome'; |
Phil Sturgeon | 23174a6 | 2010-12-15 15:18:16 +0000 | [diff] [blame] | 89 | $route['404_override'] = ''; |
Andrey Andreev | 08fec7b | 2013-07-19 16:25:51 +0300 | [diff] [blame] | 90 | $route['translate_uri_dashes'] = FALSE; |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 91 | |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 92 | /* End of file routes.php */ |
Derek Jones | f0b3994 | 2010-03-25 10:08:20 -0500 | [diff] [blame] | 93 | /* Location: ./application/config/routes.php */ |