diff options
author | Greg Aker <greg@gregaker.net> | 2011-08-20 18:58:58 +0200 |
---|---|---|
committer | Greg Aker <greg@gregaker.net> | 2011-08-20 18:58:58 +0200 |
commit | abbad9ea53e81c6e3211029711ac5b2ab4f1978d (patch) | |
tree | 9a4d5a8587da1dd3a365251afa37be2f835a53c2 /user_guide/general/routing.html | |
parent | 71644d683d0a15a6f7e04fabd0f51a4200d620b4 (diff) | |
parent | d56be70257696d0bbf2dcc880888d8dc17cba21c (diff) |
Merge branch 'develop' into feature/unit-tests
Conflicts:
.hgignore
Diffstat (limited to 'user_guide/general/routing.html')
-rw-r--r-- | user_guide/general/routing.html | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/user_guide/general/routing.html b/user_guide/general/routing.html index 6f06ad64f..c6429628e 100644 --- a/user_guide/general/routing.html +++ b/user_guide/general/routing.html @@ -28,7 +28,7 @@ <div id="masthead"> <table cellpadding="0" cellspacing="0" border="0" style="width:100%"> <tr> -<td><h1>CodeIgniter User Guide Version 2.0.2</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> @@ -80,7 +80,7 @@ To overcome this, CodeIgniter allows you to remap the URI handler.</p> <h2>Setting your own routing rules</h2> -<p>Routing rules are defined in your <var>application/config/routes.php</var> file. In it you'll see an array called <dfn>$route</dfn> that +<p>Routing rules are defined in your <var>application/config/routes.php</var> file. In it you'll see an array called <dfn>$route</dfn> that permits you to specify your own routing criteria. Routes can either be specified using <dfn>wildcards</dfn> or <dfn>Regular Expressions</dfn></p> @@ -90,7 +90,7 @@ permits you to specify your own routing criteria. Routes can either be specified <code>$route['product/:num'] = "catalog/product_lookup";</code> -<p>In a route, the array key contains the URI to be matched, while the array value contains the destination it should be re-routed to. +<p>In a route, the array key contains the URI to be matched, while the array value contains the destination it should be re-routed to. In the above example, if the literal word "product" is found in the first segment of the URL, and a number is found in the second segment, the "catalog" class and the "product_lookup" method are instead used.</p> @@ -111,10 +111,10 @@ Higher routes will always take precedence over lower ones.</p> <p>A URL containing the word "journals" in the first segment will be remapped to the "blogs" class.</p> <code>$route['blog/joe'] = "blogs/users/34";</code> -<p>A URL containing the segments blog/joe will be remapped to the "blogs" class and the "users" method. The ID will be set to "34".</p> +<p>A URL containing the segments blog/joe will be remapped to the "blogs" class and the "users" method. The ID will be set to "34".</p> <code>$route['product/(:any)'] = "catalog/product_lookup";</code> -<p>A URL with "product" as the first segment, and anything in the second will be remapped to the "catalog" class and the "product_lookup" method.</p> +<p>A URL with "product" as the first segment, and anything in the second will be remapped to the "catalog" class and the "product_lookup" method.</p> <code>$route['product/(:num)'] = "catalog/product_lookup_by_id/$1";</code> <p>A URL with "product" as the first segment, and a number in the second will be remapped to the "catalog" class and the "product_lookup_by_id" method passing in the match as a variable to the function.</p> @@ -123,7 +123,7 @@ Higher routes will always take precedence over lower ones.</p> <h2>Regular Expressions</h2> -<p>If you prefer you can use regular expressions to define your routing rules. Any valid regular expression is allowed, as are back-references.</p> +<p>If you prefer you can use regular expressions to define your routing rules. Any valid regular expression is allowed, as are back-references.</p> <p class="important"><strong>Note:</strong> If you use back-references you must use the dollar syntax rather than the double backslash syntax.</p> @@ -142,7 +142,7 @@ Higher routes will always take precedence over lower ones.</p> <code>$route['default_controller'] = 'welcome';</code> <p>This route indicates which controller class should be loaded if the URI contains no data, which will be the case -when people load your root URL. In the above example, the "welcome" class would be loaded. You +when people load your root URL. In the above example, the "welcome" class would be loaded. You are encouraged to always have a default route otherwise a 404 page will appear by default.</p> <code>$route['404_override'] = '';</code> |