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
This commit is contained in:
@@ -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
|
new page named "nextPage/". The FALSE will be change in case of modular
|
||||||
application (see the MODULAR APPLICATION chapter)
|
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
|
6. Output : the renderer
|
||||||
------------------------
|
------------------------
|
||||||
When a controller has finished his job, the result returned to the main class of
|
When a controller has finished his job, the result returned to the main class of
|
||||||
|
|||||||
Reference in New Issue
Block a user