From 34b0dfe09564229c8359cba67d27fab29558bacc Mon Sep 17 00:00:00 2001 From: Dominique Fournier Date: Sun, 27 Jul 2014 05:19:45 +0000 Subject: [PATCH] Add the cas study for routing with ending slash in docs git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1565 bf3deb0d-5f1a-0410-827f-c0cc1f45334c --- docs/USAGE | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/USAGE b/docs/USAGE index c11397b..4cd9888 100644 --- a/docs/USAGE +++ b/docs/USAGE @@ -112,6 +112,15 @@ If the URL match the requested search, the Web browser will load immediately a new page named "nextPage/". The FALSE will be change in case of modular application (see the MODULAR APPLICATION chapter) +The Ending slash can be a problem and can be removed by using : + // If there is a no catch route ending with slash, try to reroute without slash + $route->get ("{string}/", + function ($string) + { + $r=new route (); + $r->redirect ($r->baseURL().$string); + }); + 6. Output : the renderer ------------------------ When a controller has finished his job, the result returned to the main class of