From d61962a18ac384d0b27e1cb178dd4cb59dfc1ef8 Mon Sep 17 00:00:00 2001
From: Christophe Le Guern <c35sys@gmail.com>
Date: Mon, 16 Mar 2015 09:14:14 +0100
Subject: [PATCH] Add setting.AppSubUrl for LANDING_PAGE = explore

Add setting.AppSubUrl in case of different ROOT_URL and LANDING_PAGE = explore
---
 modules/middleware/auth.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/middleware/auth.go b/modules/middleware/auth.go
index 3c06c69f8..b2aaae101 100644
--- a/modules/middleware/auth.go
+++ b/modules/middleware/auth.go
@@ -30,7 +30,7 @@ func Toggle(options *ToggleOptions) macaron.Handler {
 
 		// Checking non-logged users landing page.
 		if !ctx.IsSigned && ctx.Req.RequestURI == "/" && setting.LandingPageUrl != setting.LANDING_PAGE_HOME {
-			ctx.Redirect(string(setting.LandingPageUrl))
+			ctx.Redirect(setting.AppSubUrl + string(setting.LandingPageUrl))
 			return
 		}