// Fix request_uri when there is no / at the end of the string #PSFV-606

This commit is contained in:
rMalie
2012-03-14 13:25:34 +00:00
parent a2b2b9ed96
commit 3bc2ceeee7

View File

@@ -82,6 +82,9 @@ if (!isset($_SERVER['REQUEST_URI']) || empty($_SERVER['REQUEST_URI']))
}
}
if (substr($_SERVER['REQUEST_URI'], -1) != '/')
$_SERVER['REQUEST_URI'] .= '/';
/* Trying to redefine HTTP_HOST if empty (on some webservers...) */
if (!isset($_SERVER['HTTP_HOST']) || empty($_SERVER['HTTP_HOST']))
$_SERVER['HTTP_HOST'] = @getenv('HTTP_HOST');