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
This commit is contained in:
sminnee 2008-11-28 00:53:11 +00:00 committed by Sam Minnee
parent 2bc705b9ef
commit 4a636eb98b
2 changed files with 6 additions and 1 deletions

View File

@ -9,11 +9,12 @@ Deny from all
Allow from 127.0.0.1 Allow from 127.0.0.1
</Files> </Files>
<IfModule mod_rewrite.c>
RewriteEngine On RewriteEngine On
RewriteCond %{REQUEST_URI} !(\.gif)|(\.jpg)|(\.png)|(\.css)|(\.js)|(\.php)$ RewriteCond %{REQUEST_URI} !(\.gif)|(\.jpg)|(\.png)|(\.css)|(\.js)|(\.php)$
RewriteCond %{REQUEST_URI} ^(.*)$ RewriteCond %{REQUEST_URI} ^(.*)$
RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule .* sapphire/main.php?url=%1&%{QUERY_STRING} [L] RewriteRule .* sapphire/main.php?url=%1&%{QUERY_STRING} [L]
</IfModule>
### SILVERSTRIPE END ### ### SILVERSTRIPE END ###

View File

@ -838,6 +838,7 @@ Deny from all
Allow from 127.0.0.1 Allow from 127.0.0.1
</Files> </Files>
<IfModule mod_rewrite.c>
RewriteEngine On RewriteEngine On
$baseClause $baseClause
RewriteCond %{REQUEST_URI} !(\.gif)|(\.jpg)|(\.png)|(\.css)|(\.js)|(\.php)$ 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_URI} ^(.*)$
RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule .* sapphire/main.php?url=%1&%{QUERY_STRING} [L] RewriteRule .* sapphire/main.php?url=%1&%{QUERY_STRING} [L]
</IfModule>
TEXT TEXT
; ;
@ -882,6 +884,7 @@ Deny from all
Allow from 127.0.0.1 Allow from 127.0.0.1
</Files> </Files>
<IfModule mod_rewrite.c>
RewriteEngine On RewriteEngine On
$baseClause $baseClause
RewriteCond %{REQUEST_URI} !(\.gif)|(\.jpg)|(\.png)|(\.css)|(\.js)|(\.php)$ 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_URI} ^(.*)$
RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule .* $_SERVER[DOCUMENT_ROOT]/sapphire/main.php?url=%1&%{QUERY_STRING} [L] RewriteRule .* $_SERVER[DOCUMENT_ROOT]/sapphire/main.php?url=%1&%{QUERY_STRING} [L]
</IfModule>
TEXT; TEXT;
if(file_exists($this->getBaseDir() . '.htaccess')) { if(file_exists($this->getBaseDir() . '.htaccess')) {