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 | * |
| 7 | * NOTICE OF LICENSE |
Andrey Andreev | e734b38 | 2012-03-26 13:42:36 +0300 | [diff] [blame] | 8 | * |
Derek Jones | f4a4bd8 | 2011-10-20 12:18:42 -0500 | [diff] [blame] | 9 | * Licensed under the Academic Free License version 3.0 |
Andrey Andreev | e734b38 | 2012-03-26 13:42:36 +0300 | [diff] [blame] | 10 | * |
Derek Jones | 61df906 | 2011-10-21 09:55:40 -0500 | [diff] [blame] | 11 | * This source file is subject to the Academic Free License (AFL 3.0) that is |
Derek Jones | f4a4bd8 | 2011-10-20 12:18:42 -0500 | [diff] [blame] | 12 | * bundled with this package in the files license_afl.txt / license_afl.rst. |
| 13 | * It is also available through the world wide web at this URL: |
| 14 | * http://opensource.org/licenses/AFL-3.0 |
| 15 | * If you did not receive a copy of the license and are unable to obtain it |
| 16 | * through the world wide web, please send an email to |
| 17 | * licensing@ellislab.com so we can send you a copy immediately. |
| 18 | * |
| 19 | * @package CodeIgniter |
| 20 | * @author EllisLab Dev Team |
darwinel | 871754a | 2014-02-11 17:34:57 +0100 | [diff] [blame] | 21 | * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) |
Derek Jones | f4a4bd8 | 2011-10-20 12:18:42 -0500 | [diff] [blame] | 22 | * @license http://opensource.org/licenses/AFL-3.0 Academic Free License (AFL 3.0) |
| 23 | * @link http://codeigniter.com |
| 24 | * @since Version 1.0 |
| 25 | * @filesource |
| 26 | */ |
darwinel | d8bef8a | 2014-02-11 20:13:22 +0100 | [diff] [blame^] | 27 | defined('BASEPATH') OR exit('No direct script access allowed'); |
Derek Jones | f4a4bd8 | 2011-10-20 12:18:42 -0500 | [diff] [blame] | 28 | |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 29 | /* |
| 30 | | ------------------------------------------------------------------------- |
| 31 | | URI ROUTING |
| 32 | | ------------------------------------------------------------------------- |
| 33 | | This file lets you re-map URI requests to specific controller functions. |
| 34 | | |
| 35 | | Typically there is a one-to-one relationship between a URL string |
| 36 | | and its corresponding controller class/method. The segments in a |
| 37 | | URL normally follow this pattern: |
| 38 | | |
Barry Mieny | dd67197 | 2010-10-04 16:33:58 +0200 | [diff] [blame] | 39 | | example.com/class/method/id/ |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 40 | | |
| 41 | | In some instances, however, you may want to remap this relationship |
| 42 | | so that a different class/function is called than the one |
| 43 | | corresponding to the URL. |
| 44 | | |
| 45 | | Please see the user guide for complete details: |
| 46 | | |
| 47 | | http://codeigniter.com/user_guide/general/routing.html |
| 48 | | |
| 49 | | ------------------------------------------------------------------------- |
| 50 | | RESERVED ROUTES |
| 51 | | ------------------------------------------------------------------------- |
| 52 | | |
Andrey Andreev | 08fec7b | 2013-07-19 16:25:51 +0300 | [diff] [blame] | 53 | | There are three reserved routes: |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 54 | | |
| 55 | | $route['default_controller'] = 'welcome'; |
| 56 | | |
| 57 | | This route indicates which controller class should be loaded if the |
| 58 | | URI contains no data. In the above example, the "welcome" class |
| 59 | | would be loaded. |
Phil Sturgeon | 23174a6 | 2010-12-15 15:18:16 +0000 | [diff] [blame] | 60 | | |
| 61 | | $route['404_override'] = 'errors/page_missing'; |
| 62 | | |
Andrey Andreev | 51b7acd | 2012-10-29 16:23:13 +0200 | [diff] [blame] | 63 | | This route will tell the Router which controller/method to use if those |
| 64 | | provided in the URL cannot be matched to a valid route. |
Phil Sturgeon | 23174a6 | 2010-12-15 15:18:16 +0000 | [diff] [blame] | 65 | | |
Andrey Andreev | 08fec7b | 2013-07-19 16:25:51 +0300 | [diff] [blame] | 66 | | $route['translate_uri_dashes'] = FALSE; |
| 67 | | |
| 68 | | This is not exactly a route, but allows you to automatically route |
| 69 | | controller and method names that contain dashes. '-' isn't a valid |
| 70 | | class or method name character, so it requires translation. |
| 71 | | When you set this option to TRUE, it will replace ALL dashes in the |
| 72 | | controller and method URI segments. |
| 73 | | |
| 74 | | Examples: my-controller/index -> my_controller/index |
| 75 | | my-controller/my-method -> my_controller/my_method |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 76 | */ |
Alex Bilbie | 1ef1919 | 2012-05-17 20:41:12 +0100 | [diff] [blame] | 77 | $route['default_controller'] = 'welcome'; |
Phil Sturgeon | 23174a6 | 2010-12-15 15:18:16 +0000 | [diff] [blame] | 78 | $route['404_override'] = ''; |
Andrey Andreev | 08fec7b | 2013-07-19 16:25:51 +0300 | [diff] [blame] | 79 | $route['translate_uri_dashes'] = FALSE; |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 80 | |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 81 | /* End of file routes.php */ |
Derek Jones | f0b3994 | 2010-03-25 10:08:20 -0500 | [diff] [blame] | 82 | /* Location: ./application/config/routes.php */ |