BUGFIX: Fixed mod_rewrite-less operation in the root folder of a windows box (from r72995) (from r92243)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/phpinstaller/branches/2.4@92281 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
ischommer 2009-11-19 20:35:43 +00:00 committed by Sam Minnee
parent 30ddfa5fff
commit 375340e94c

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();