mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGFIX Making sure phpinstaller works on subdomains (see #3167)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@68515 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
c92163198d
commit
25f9a20d29
3
main.php
3
main.php
@ -95,7 +95,8 @@ require_once("core/model/DB.php");
|
||||
|
||||
// Redirect to the installer if no database is selected
|
||||
if(!isset($databaseConfig) || !isset($databaseConfig['database']) || !$databaseConfig['database']) {
|
||||
$installURL = dirname(dirname($_SERVER['SCRIPT_NAME'])) . '/install.php';
|
||||
$s = (isset($_SERVER['SSL']) || (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off')) ? 's' : '';
|
||||
$installURL = "http$s://" . $_SERVER['HTTP_HOST'] . dirname(dirname($_SERVER['SCRIPT_NAME'])) . '/install.php';
|
||||
header("Location: $installURL");
|
||||
die();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user