From b7a0f6dd18b5ad4c54a29fd937773710fbb4498f Mon Sep 17 00:00:00 2001 From: ischommer Date: Thu, 19 Nov 2009 20:32:36 +0000 Subject: [PATCH] MINOR: Removed no-longer-used createHtAccessAlternative() (from r66916) (from r92230) git-svn-id: svn://svn.silverstripe.com/silverstripe/open/phpinstaller/branches/2.4@92271 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- install.php | 45 --------------------------------------------- 1 file changed, 45 deletions(-) diff --git a/install.php b/install.php index dea016f..ae054ac 100644 --- a/install.php +++ b/install.php @@ -906,51 +906,6 @@ TEXT $this->createFile('.htaccess', $start . $rewrite . $end); } - - function createHtaccessAlternative() { - $start = "### SILVERSTRIPE START ###\n"; - $end= "\n### SILVERSTRIPE END ###"; - - $base = dirname($_SERVER['SCRIPT_NAME']); - if($base != '.') $baseClause = "RewriteBase $base\n"; - - $rewrite = << -DirectorySlash Off - - - -Order deny,allow -Deny from all -Allow from 127.0.0.1 - - -RewriteEngine On -$baseClause -RewriteCond %{REQUEST_URI} !(\.gif$)|(\.jpg$)|(\.png$)|(\.css$)|(\.js$) - -RewriteCond %{REQUEST_URI} ^(.*)$ -RewriteCond %{REQUEST_FILENAME} !-f -RewriteRule .* $_SERVER[DOCUMENT_ROOT]/sapphire/main.php?url=%1&%{QUERY_STRING} [L] -TEXT; - - if(file_exists($this->getBaseDir() . '.htaccess')) { - $htaccess = file_get_contents($this->getBaseDir() . '.htaccess'); - - if(strpos($htaccess, '### SILVERSTRIPE START ###') === false && strpos($htaccess, '### SILVERSTRIPE END ###') === false) { - $htaccess .= "\n### SILVERSTRIPE START ###\n### SILVERSTRIPE END ###\n"; - } - - if(strpos($htaccess, '### SILVERSTRIPE START ###') !== false && strpos($htaccess, '### SILVERSTRIPE END ###') !== false) { - $start = substr($htaccess, 0, strpos($htaccess, '### SILVERSTRIPE START ###')) . "### SILVERSTRIPE START ###\n"; - $end = "\n" . substr($htaccess, strpos($htaccess, '### SILVERSTRIPE END ###')); - } - } - - echo "\n\nRewrite is $rewrite\n"; - - $this->createFile('.htaccess', $start . $rewrite . $end); - } function restoreHtaccess() { $start = "### SILVERSTRIPE START ###\n";