From 4a636eb98bbbcd43dba07e85fbba7447470a81a9 Mon Sep 17 00:00:00 2001 From: sminnee Date: Fri, 28 Nov 2008 00:53:11 +0000 Subject: [PATCH] Updated default htaccess to avoid 500 error if mod_rewrite isn't installed git-svn-id: svn://svn.silverstripe.com/silverstripe/open/phpinstaller/branches/2.3@66884 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- .htaccess | 3 ++- install.php | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.htaccess b/.htaccess index d33e938..1cd6ad2 100644 --- a/.htaccess +++ b/.htaccess @@ -9,11 +9,12 @@ Deny from all Allow from 127.0.0.1 + RewriteEngine On - RewriteCond %{REQUEST_URI} !(\.gif)|(\.jpg)|(\.png)|(\.css)|(\.js)|(\.php)$ RewriteCond %{REQUEST_URI} ^(.*)$ RewriteCond %{REQUEST_FILENAME} !-f RewriteRule .* sapphire/main.php?url=%1&%{QUERY_STRING} [L] + ### SILVERSTRIPE END ### \ No newline at end of file diff --git a/install.php b/install.php index 0b9387b..149793a 100644 --- a/install.php +++ b/install.php @@ -838,6 +838,7 @@ Deny from all Allow from 127.0.0.1 + RewriteEngine On $baseClause RewriteCond %{REQUEST_URI} !(\.gif)|(\.jpg)|(\.png)|(\.css)|(\.js)|(\.php)$ @@ -845,6 +846,7 @@ RewriteCond %{REQUEST_URI} !(\.gif)|(\.jpg)|(\.png)|(\.css)|(\.js)|(\.php)$ RewriteCond %{REQUEST_URI} ^(.*)$ RewriteCond %{REQUEST_FILENAME} !-f RewriteRule .* sapphire/main.php?url=%1&%{QUERY_STRING} [L] + TEXT ; @@ -882,6 +884,7 @@ Deny from all Allow from 127.0.0.1 + RewriteEngine On $baseClause RewriteCond %{REQUEST_URI} !(\.gif)|(\.jpg)|(\.png)|(\.css)|(\.js)|(\.php)$ @@ -889,6 +892,7 @@ RewriteCond %{REQUEST_URI} !(\.gif)|(\.jpg)|(\.png)|(\.css)|(\.js)|(\.php)$ 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')) {