BUGFIX: fixed double slash when installed in the root. PATCH via simon_w. #4733

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/phpinstaller/branches/2.4@98038 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
wrossiter 2010-02-03 02:57:14 +00:00 committed by Sam Minnee
parent a3e887a59e
commit 1b57a81088
1 changed files with 1 additions and 1 deletions

View File

@ -54,7 +54,7 @@ $fileName = dirname($_SERVER['SCRIPT_FILENAME']) . '/' . $url;
* Very quickly pass through references to files
*/
if($url && file_exists($fileName)) {
$fileURL = dirname($_SERVER['SCRIPT_NAME']) . '/' . $url;
$fileURL = (dirname($_SERVER['SCRIPT_NAME'])=='/'?'':dirname($_SERVER['SCRIPT_NAME'])) . '/' . $url;
header($_SERVER['SERVER_PROTOCOL'] . ' 301 Moved Permanently');
header("Location: $fileURL");
die();