BUGFIX: Fixed mod_rewrite-less operation in the root folder of a windows box

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/phpinstaller/branches/2.3@72995 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
sminnee 2009-03-13 00:20:02 +00:00 committed by Sam Minnee
parent 92d82236e2
commit c40f843145

View File

@ -32,7 +32,9 @@ if($ruLen > $snLen && substr($_SERVER['REQUEST_URI'],0,$snLen+1) == ($_SERVER['S
* Very quickly pass through references to files
*/
if(file_exists($fileName)) {
$fileURL = dirname($_SERVER['SCRIPT_NAME']) . '/' . $url;
$baseURL = dirname($_SERVER['SCRIPT_NAME']);
if($baseURL == "\\" || $baseURL == "/") $baseURL = "";
$fileURL = "$baseURL/$url";
header($_SERVER['SERVER_PROTOCOL'] . ' 301 Moved Permanently');
header("Location: $fileURL");
die();