summaryrefslogtreecommitdiffstats
path: root/user_guide_src/source/general/urls.rst
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-11-01 18:55:42 +0100
committerAndrey Andreev <narf@bofh.bg>2012-11-01 18:55:42 +0100
commitd1097a1dc30f40c68bc4a5c89d3fadb295c55e56 (patch)
treebc5e12c402d1abb6b00e064161f76aa3bf543189 /user_guide_src/source/general/urls.rst
parent8161e57a1c038566ff28a6ba08c9b165079c9b75 (diff)
Allow use of dashes in controller/method URI segments
Supersedes PR #642
Diffstat (limited to 'user_guide_src/source/general/urls.rst')
-rw-r--r--user_guide_src/source/general/urls.rst27
1 files changed, 23 insertions, 4 deletions
diff --git a/user_guide_src/source/general/urls.rst b/user_guide_src/source/general/urls.rst
index 6b390b559..20f80632a 100644
--- a/user_guide_src/source/general/urls.rst
+++ b/user_guide_src/source/general/urls.rst
@@ -28,9 +28,28 @@ approach, usually represent::
#. The third, and any additional segments, represent the ID and any
variables that will be passed to the controller.
-The :doc:`URI Class <../libraries/uri>` and the :doc:`URL Helper <../helpers/url_helper>` contain functions that make it
-easy to work with your URI data. In addition, your URLs can be remapped
-using the :doc:`URI Routing <routing>` feature for more flexibility.
+The :doc:`URI Class <../libraries/uri>` and the :doc:`URL Helper <../helpers/url_helper>`
+contain functions that make it easy to work with your URI data. In addition,
+your URLs can be remapped using the :doc:`URI Routing <routing>` feature for
+more flexibility.
+
+Friendly URLs
+=============
+
+As you might guess, since there's a straight relationship between
+URI segments and the controller/method pair that's being called,
+those two determining segments must represent a valid class and
+method name.
+You may however also use dashes in the class/method-representing
+segments, and they will automatically be translated to underscores
+in order to be valid routed segments.
+
+For example::
+
+ example.com/my-settings/change-password/
+
+The above example will route to the ``My_settings`` controller and
+its method ``change_password()``.
Removing the index.php file
===========================
@@ -94,4 +113,4 @@ active. Your controllers and functions will then be accessible using the
.. note:: If you are using query strings you will have to build
your own URLs, rather than utilizing the URL helpers (and other helpers
that generate URLs, like some of the form helpers) as these are designed
- to work with segment based URLs.
+ to work with segment based URLs. \ No newline at end of file