@@ -6,11 +6,29 @@ URI Routing
66 :local:
77 :depth: 2
88
9+ ******************************
10+ Auto Routes and Defined Routes
11+ ******************************
12+
13+ Auto Routes
14+ ===========
15+
916Typically there is a one-to-one relationship between a URL string and its corresponding
1017controller class/method. The segments in a URI normally follow this pattern::
1118
1219 example.com/class/method/id/
1320
21+ We call this "**Auto Routes **". CodeIgniter automatically routes an HTTP request,
22+ and executes the corresponding controller method. The auto-routing is enabled by default.
23+
24+ .. note :: To prevent misconfiguration and miscoding, we recommend that you disable
25+ the auto-routing feature. See :ref: `use-defined-routes-only `.
26+
27+ .. important :: The auto-routing routes a HTTP request with **any** HTTP method to a controller method.
28+
29+ Defined Routes
30+ ==============
31+
1432In some instances, however, you may want to remap this relationship so that a different
1533class/method can be called instead of the one corresponding to the URL.
1634
@@ -23,9 +41,10 @@ For example, let’s say you want your URLs to have this prototype::
2341
2442Normally the second segment of the URL path is reserved for the method name, but in the example
2543above it instead has a product ID. To overcome this, CodeIgniter allows you to remap the URI handler.
44+ We call this "**Defined Routes **".
2645
2746******************************
28- Setting your own routing rules
47+ Setting Your Own Routing Rules
2948******************************
3049
3150Routing rules are defined in the **app/Config/Routes.php ** file. In it you'll see that
0 commit comments