route : redirect is now OK without the complete URL

git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2075 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
2015-04-27 13:58:26 +00:00
parent 1578a21a6b
commit 11106afc7c

View File

@@ -130,7 +130,8 @@ class route
$requestURL = $this->requestURL ();
if (substr ($requestURL, -1) !== "/")
$requestURL .= "/";
if ($destURL[0] === "/")
if ($destURL[0] === "/" &&
substr ($destURL, 0, strlen ($baseURL)) !== $baseURL)
{
// Absolute : return to project base
$destURL = $baseURL.substr ($destURL, 1);