From 54907dfbd198628a2da18b8e1f350dd4e4f54514 Mon Sep 17 00:00:00 2001 From: Ethan Koenig Date: Wed, 6 Dec 2017 17:09:02 -0800 Subject: Fix legacy URL redirects (#3100) --- modules/context/repo.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'modules') diff --git a/modules/context/repo.go b/modules/context/repo.go index 66250a0f3e..7651d43fad 100644 --- a/modules/context/repo.go +++ b/modules/context/repo.go @@ -618,7 +618,11 @@ func RepoRefByType(refType RepoRefType) macaron.Handler { if refType == RepoRefLegacy { // redirect from old URL scheme to new URL scheme - ctx.Redirect(path.Join(setting.AppSubURL, strings.TrimSuffix(ctx.Req.URL.String(), ctx.Params("*")), ctx.Repo.BranchNameSubURL())) + ctx.Redirect(path.Join( + setting.AppSubURL, + strings.TrimSuffix(ctx.Req.URL.String(), ctx.Params("*")), + ctx.Repo.BranchNameSubURL(), + ctx.Repo.TreePath)) return } } -- cgit v1.2.3