summaryrefslogtreecommitdiffstats
path: root/user_guide_src/source/general
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2015-11-23 12:09:22 +0100
committerAndrey Andreev <narf@devilix.net>2015-11-23 12:09:22 +0100
commit01d53bd69aef482a42d5bbc94fd3496e79a97f23 (patch)
treefdf0dffbed56a027a58627d03bd52fa90333f907 /user_guide_src/source/general
parentb3847796666c8466dcfafaddbda1f13b4acf605e (diff)
[ci skip] Update routing docs
Close #4258
Diffstat (limited to 'user_guide_src/source/general')
-rw-r--r--user_guide_src/source/general/routing.rst11
1 files changed, 6 insertions, 5 deletions
diff --git a/user_guide_src/source/general/routing.rst b/user_guide_src/source/general/routing.rst
index b2c9873ab..515368099 100644
--- a/user_guide_src/source/general/routing.rst
+++ b/user_guide_src/source/general/routing.rst
@@ -113,18 +113,19 @@ A typical RegEx route might look something like this::
In the above example, a URI similar to products/shirts/123 would instead
call the "shirts" controller class and the "id_123" method.
-With regular expressions, you can also catch a segment containing a
-forward slash ('/'), which would usually represent the delimiter between
-multiple segments.
-
+With regular expressions, you can also catch multiple segments at once.
For example, if a user accesses a password protected area of your web
application and you wish to be able to redirect them back to the same
page after they log in, you may find this example useful::
$route['login/(.+)'] = 'auth/login/$1';
+.. note:: In the above example, if the ``$1`` placeholder contains a
+ slash, it will still be split into multiple parameters when
+ passed to ``Auth::login()``.
+
For those of you who don't know regular expressions and want to learn
-more about them, `regular-expressions.info <http://www.regular-expressions.info/>`
+more about them, `regular-expressions.info <http://www.regular-expressions.info/>`_
might be a good starting point.
.. note:: You can also mix and match wildcards with regular expressions.