diff --git a/core/server/middleware/index.js b/core/server/middleware/index.js index ada3465597..f1e807d1af 100644 --- a/core/server/middleware/index.js +++ b/core/server/middleware/index.js @@ -180,6 +180,15 @@ function redirectToSignup(req, res, next) { api.users.doesUserExist().then(function (exists) { if (!exists) { + // TODO remove this when ember admin becomes the default + if (req.path.match(/\/ember\//)) { + if (!req.path.match(/\/ghost\/ember\/signup\//)) { + return res.redirect(config().paths.subdir + '/ghost/ember/signup/'); + } else { + return next(); + } + } + // END remove this return res.redirect(config().paths.subdir + '/ghost/signup/'); } next(); diff --git a/core/server/routes/admin.js b/core/server/routes/admin.js index d1a9a00fc3..5e79c6ee60 100644 --- a/core/server/routes/admin.js +++ b/core/server/routes/admin.js @@ -10,7 +10,7 @@ var admin = require('../controllers/admin'), adminRoutes = function (server) { // Have ember route look for hits first // to prevent conflicts with pre-existing routes - server.get('/ghost/ember/*', admin.index); + server.get('/ghost/ember/*', middleware.redirectToSignup, admin.index); var subdir = config().paths.subdir; // ### Admin routes