summaryrefslogtreecommitdiffstats
path: root/application/config/routes.php
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2017-09-26 13:46:14 +0200
committerFlorian Pritz <bluewind@xinu.at>2017-09-26 13:46:14 +0200
commit3ff6ffa3341c876b741feb66552cdd110b67872e (patch)
tree69e11cd0009ddd1346f2dc4cd8c47244368db28e /application/config/routes.php
parentbc2f7f596f727e204e8b8c5b849545745b3cbfaa (diff)
parent81a4c8c630ef59cffea0c24e64fb6fa7f09bfcf6 (diff)
Merge CodeIgniter 3 support
Diffstat (limited to 'application/config/routes.php')
-rw-r--r--application/config/routes.php42
1 files changed, 25 insertions, 17 deletions
diff --git a/application/config/routes.php b/application/config/routes.php
index f44f283f0..4e4d8c71e 100644
--- a/application/config/routes.php
+++ b/application/config/routes.php
@@ -1,4 +1,6 @@
-<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+<?php
+defined('BASEPATH') OR exit('No direct script access allowed');
+
/*
| -------------------------------------------------------------------------
| URI ROUTING
@@ -17,13 +19,13 @@
|
| Please see the user guide for complete details:
|
-| http://codeigniter.com/user_guide/general/routing.html
+| https://codeigniter.com/user_guide/general/routing.html
|
| -------------------------------------------------------------------------
| RESERVED ROUTES
| -------------------------------------------------------------------------
|
-| There area two reserved routes:
+| There are three reserved routes:
|
| $route['default_controller'] = 'welcome';
|
@@ -33,20 +35,26 @@
|
| $route['404_override'] = 'errors/page_missing';
|
-| This route will tell the Router what URI segments to use if those provided
-| in the URL cannot be matched to a valid route.
+| This route will tell the Router which controller/method to use if those
+| provided in the URL cannot be matched to a valid route.
+|
+| $route['translate_uri_dashes'] = FALSE;
+|
+| This is not exactly a route, but allows you to automatically route
+| controller and method names that contain dashes. '-' isn't a valid
+| class or method name character, so it requires translation.
+| When you set this option to TRUE, it will replace ALL dashes in the
+| controller and method URI segments.
|
+| Examples: my-controller/index -> my_controller/index
+| my-controller/my-method -> my_controller/my_method
*/
-
-$route['default_controller'] = "file/file_default";
-$route['user/(:any)'] = "user/$1";
-$route['file/multipaste/(:any)'] = "file/multipaste/$1";
-$route['file/(:any)'] = "file/file_default/$1";
-$route['tools/(:any)'] = "tools/$1";
-$route['api/(:any)'] = "api/route/$1";
-$route['(:any)'] = "file/file_default/index/$1";
+$route['default_controller'] = "main";
+$route['user/(.+)'] = "user/$1";
+$route['file/multipaste/(.+)'] = "file/multipaste/$1";
+$route['file/(.+)'] = "main/$1";
+$route['tools/(.+)'] = "tools/$1";
+$route['api/(.+)'] = "api/route/$1";
+$route['(.+)'] = "main/index/$1";
$route['404_override'] = '';
-
-
-/* End of file routes.php */
-/* Location: ./application/config/routes.php */ \ No newline at end of file
+$route['translate_uri_dashes'] = FALSE;