#1874 - generated .htaccess lacks "Rewritebase"

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/phpinstaller/trunk@47868 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
aoneil 2008-01-10 23:40:26 +00:00
parent 40fe857bfb
commit b2156f92bc
2 changed files with 15 additions and 22 deletions

View File

@ -737,10 +737,12 @@ PHP
function createHtaccess() {
$start = "### SILVERSTRIPE START ###\n";
$end= "\n### SILVERSTRIPE END ###";
$end = "\n### SILVERSTRIPE END ###";
$base = dirname($_SERVER['SCRIPT_NAME']);
$rewrite = <<<TEXT
RewriteEngine On
RewriteBase $base
RewriteCond %{REQUEST_URI} !(\.gif)|(\.jpg)|(\.png)|(\.css)|(\.js)|(\.php)$
@ -750,11 +752,6 @@ RewriteRule .* sapphire/main.php?url=%1&%{QUERY_STRING} [L]
TEXT
;
$baseURL = dirname($_SERVER['SCRIPT_NAME']);
if($baseURL == "/") {
$baseURL = "";
}
if(file_exists('.htaccess')) {
$htaccess = file_get_contents('.htaccess');
@ -773,9 +770,12 @@ TEXT
function createHtaccessAlternative() {
$start = "### SILVERSTRIPE START ###\n";
$end= "\n### SILVERSTRIPE END ###";
$end= "\n### SILVERSTRIPE END ###";
$base = dirname($_SERVER['SCRIPT_NAME']);
$rewrite = <<<TEXT
RewriteEngine On
RewriteBase $base
RewriteCond %{REQUEST_URI} !(\.gif)|(\.jpg)|(\.png)|(\.css)|(\.js)|(\.php)$
@ -785,10 +785,6 @@ RewriteRule .* $_SERVER[DOCUMENT_ROOT]/sapphire/main.php?url=%1&%{QUERY_STRING}
TEXT
;
$baseURL = dirname($_SERVER['SCRIPT_NAME']);
if($baseURL == "/") {
$baseURL = "";
}
if(file_exists('.htaccess')) {
$htaccess = file_get_contents('.htaccess');

View File

@ -75,8 +75,11 @@ function performModRewriteTest() {
function createHtaccess() {
$start = "### SILVERSTRIPE START ###\n";
$end= "\n### SILVERSTRIPE END ###";
$base = dirname($_SERVER['SCRIPT_NAME']);
$rewrite = <<<TEXT
RewriteEngine On
RewriteBase $base
RewriteCond %{REQUEST_URI} !(\.gif)|(\.jpg)|(\.png)|(\.css)|(\.js)|(\.php)$
@ -86,10 +89,6 @@ RewriteRule .* sapphire/main.php?url=%1&%{QUERY_STRING} [L]
TEXT
;
$baseURL = dirname($_SERVER['SCRIPT_NAME']);
if($baseURL == "/") {
$baseURL = "";
}
if(file_exists('.htaccess')) {
$htaccess = file_get_contents('.htaccess');
@ -109,8 +108,11 @@ TEXT
function createHtaccessAlternative() {
$start = "### SILVERSTRIPE START ###\n";
$end= "\n### SILVERSTRIPE END ###";
$base = dirname($_SERVER['SCRIPT_NAME']);
$rewrite = <<<TEXT
RewriteEngine On
RewriteBase $base
RewriteCond %{REQUEST_URI} !(\.gif)|(\.jpg)|(\.png)|(\.css)|(\.js)|(\.php)$
@ -119,12 +121,7 @@ RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule .* $_SERVER[DOCUMENT_ROOT]/sapphire/main.php?url=%1&%{QUERY_STRING} [L]
TEXT
;
$baseURL = dirname($_SERVER['SCRIPT_NAME']);
if($baseURL == "/") {
$baseURL = "";
}
if(file_exists('.htaccess')) {
$htaccess = file_get_contents('.htaccess');