blob: ec2e36c3bdf6e36ed3b3eb452597564e11f9349d [file] [log] [blame]
darwineld8bef8a2014-02-11 20:13:22 +01001<?php
darwineld8bef8a2014-02-11 20:13:22 +01002defined('BASEPATH') OR exit('No direct script access allowed');
Derek Jonesf4a4bd82011-10-20 12:18:42 -05003
Derek Allard2067d1a2008-11-13 22:59:24 +00004/*
5| -------------------------------------------------------------------------
6| URI ROUTING
7| -------------------------------------------------------------------------
8| This file lets you re-map URI requests to specific controller functions.
9|
10| Typically there is a one-to-one relationship between a URL string
11| and its corresponding controller class/method. The segments in a
12| URL normally follow this pattern:
13|
Barry Mienydd671972010-10-04 16:33:58 +020014| example.com/class/method/id/
Derek Allard2067d1a2008-11-13 22:59:24 +000015|
16| In some instances, however, you may want to remap this relationship
17| so that a different class/function is called than the one
18| corresponding to the URL.
19|
20| Please see the user guide for complete details:
21|
Andrey Andreevbd202c92016-01-11 12:50:18 +020022| https://codeigniter.com/user_guide/general/routing.html
Derek Allard2067d1a2008-11-13 22:59:24 +000023|
24| -------------------------------------------------------------------------
25| RESERVED ROUTES
26| -------------------------------------------------------------------------
27|
Andrey Andreev08fec7b2013-07-19 16:25:51 +030028| There are three reserved routes:
Derek Allard2067d1a2008-11-13 22:59:24 +000029|
30| $route['default_controller'] = 'welcome';
31|
32| This route indicates which controller class should be loaded if the
33| URI contains no data. In the above example, the "welcome" class
34| would be loaded.
Phil Sturgeon23174a62010-12-15 15:18:16 +000035|
36| $route['404_override'] = 'errors/page_missing';
37|
Andrey Andreev51b7acd2012-10-29 16:23:13 +020038| This route will tell the Router which controller/method to use if those
39| provided in the URL cannot be matched to a valid route.
Phil Sturgeon23174a62010-12-15 15:18:16 +000040|
Andrey Andreev08fec7b2013-07-19 16:25:51 +030041| $route['translate_uri_dashes'] = FALSE;
42|
43| This is not exactly a route, but allows you to automatically route
44| controller and method names that contain dashes. '-' isn't a valid
45| class or method name character, so it requires translation.
46| When you set this option to TRUE, it will replace ALL dashes in the
47| controller and method URI segments.
48|
49| Examples: my-controller/index -> my_controller/index
50| my-controller/my-method -> my_controller/my_method
Derek Allard2067d1a2008-11-13 22:59:24 +000051*/
Luigi Santivetti7bab4942019-06-16 07:40:53 +000052/* Requested URI is empty - https://www.giggi.me */
53$route['default_controller'] = 'pelican/index';
54
55/* Requested URI is 'about' - https://www.giggi.me/about */
56$route['(^about$|page/about)'] = 'pelican/view/about';
57
58/* Requested URI is 'blog' - https://www.giggi.me/blog */
59$route['^blog$'] = 'pelican/view/blog';
60
61/* Requested URI is 'blog' - https://www.giggi.me/blog/foo.html */
62$route['^blog/(.+)'] = 'pelican/view/$1';
63
64/* Requested URI is 'category' - https://www.giggi.me/category/bar.html */
65$route['^category/(.+)'] = 'pelican/view/$1';
66
67/* Requested URI is 'ftp' - https://www.giggi.me/ftp */
68$route['(^ftp$|page/ftp)'] = 'pelican/view/ftp';
69
70/* Requested URI is 'git' - https://www.giggi.me/gerrit */
71$route['gerrit'] = 'pelican/view/index';
72
73/* Requested URI is 'git' - https://www.giggi.me/git */
74$route['(^git$|page/git)'] = 'pelican/view/git';
75
76/* Requested URI is 'home' - https://www.giggi.me/home */
77$route['home'] = 'pelican/index';
78
79/* Requested URI is 'invite' - https://www.giggi.me/invite */
80$route['(^invite$|page/invite)'] = 'invite/view/invite';
81
82/* Requested URI is 'login' - https://www.giggi.me/login */
83$route['(^login$|page/login)'] = 'login/view/login';
84
85/* Requested URI is 'mail' - https://www.giggi.me/mail */
86$route['(^mail$|page/mail)'] = 'pelican/view/mail';
87
Phil Sturgeon23174a62010-12-15 15:18:16 +000088$route['404_override'] = '';
Andrey Andreev08fec7b2013-07-19 16:25:51 +030089$route['translate_uri_dashes'] = FALSE;