From 55f5cb66d47a1b9ebd763f1c3fc1c6b032ac043b Mon Sep 17 00:00:00 2001 From: Sean Harvey Date: Fri, 27 Nov 2009 01:26:13 +0000 Subject: [PATCH] BUGFIX Fixed dev/build not redirecting properly on first install of SS website on IIS (from r93259) git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@93750 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- core/control/ModelAsController.php | 2 +- core/control/RootURLController.php | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/core/control/ModelAsController.php b/core/control/ModelAsController.php index a2ef1d108..be54ff583 100755 --- a/core/control/ModelAsController.php +++ b/core/control/ModelAsController.php @@ -43,7 +43,7 @@ class ModelAsController extends Controller implements NestedController { // If the database has not yet been created, redirect to the build page. if(!DB::isActive() || !ClassInfo::hasTable('SiteTree')) { $this->response = new SS_HTTPResponse(); - $this->response->redirect('dev/build?returnURL=' . (isset($_GET['url']) ? urlencode($_GET['url']) : null)); + $this->response->redirect(Director::absoluteBaseURL() . 'dev/build?returnURL=' . (isset($_GET['url']) ? urlencode($_GET['url']) : null)); $this->popCurrent(); return $this->response; diff --git a/core/control/RootURLController.php b/core/control/RootURLController.php index f6e5166af..0e356ad96 100755 --- a/core/control/RootURLController.php +++ b/core/control/RootURLController.php @@ -109,8 +109,7 @@ class RootURLController extends Controller { if(!DB::isActive() || !ClassInfo::hasTable('SiteTree')) { $this->response = new SS_HTTPResponse(); - $this->response->redirect('dev/build/?returnURL='); - + $this->response->redirect(Director::absoluteBaseURL() . 'dev/build?returnURL=' . (isset($_GET['url']) ? urlencode($_GET['url']) : null)); return $this->response; }