From ed3d625fa432cc3e6af70c29d26965851f7fe624 Mon Sep 17 00:00:00 2001 From: Dominique Fournier Date: Wed, 15 Mar 2017 09:27:04 +0000 Subject: [PATCH] route: redirect: the destURL analyzer is stronger git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@3428 bf3deb0d-5f1a-0410-827f-c0cc1f45334c --- route.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/route.php b/route.php index 80cf0e5..937e519 100644 --- a/route.php +++ b/route.php @@ -225,7 +225,7 @@ class route // FIXME : Why do I add this slash ? I can not redirect the word to word/ // if (substr ($requestURL, -1) !== "/") // $requestURL .= "/"; - if ($destURL[0] === "/") + if (substr ($destURL, 0, 1) === "/") { // Absolute : return to project base $destURL = $baseURL.substr ($destURL, 1);