Fix legacy URL redirects (#3100) (#3106)

This commit is contained in:
Ethan Koenig authored and Lauris BH committed 2017-12-07 08:29:14 +02:00
1 parent b9abcb3b61
commit 237df2f339
2 files changed
+9 -3

No files matched your search

+5 -1
View File
@@ -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
}
}