From a8e23f092f6be99a688d2228b7b2ac3022ff7f6b Mon Sep 17 00:00:00 2001 From: ischommer Date: Thu, 19 Nov 2009 20:34:10 +0000 Subject: [PATCH] BUGFIX: Get index.php filename rewriting working for windows (from r72504) (from r92241) git-svn-id: svn://svn.silverstripe.com/silverstripe/open/phpinstaller/branches/2.4@92277 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- index.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/index.php b/index.php index b519ddc..acf4188 100644 --- a/index.php +++ b/index.php @@ -39,8 +39,12 @@ if($ruLen > $snLen && substr($_SERVER['REQUEST_URI'],0,$snLen+1) == ($_SERVER['S } } +// For linux $_SERVER['SCRIPT_FILENAME'] = str_replace('/index.php','/sapphire/main.php', $_SERVER['SCRIPT_FILENAME']); $_SERVER['SCRIPT_NAME'] = str_replace('/index.php','/sapphire/main.php', $_SERVER['SCRIPT_NAME']); +// And for windows +$_SERVER['SCRIPT_FILENAME'] = str_replace('\\index.php','\\sapphire\\main.php', $_SERVER['SCRIPT_FILENAME']); +$_SERVER['SCRIPT_NAME'] = str_replace('\\index.php','\\sapphire\\main.php', $_SERVER['SCRIPT_NAME']); chdir('sapphire'); require_once('sapphire/main.php');