abouttreesummaryrefslogcommitdiff
path: root/cmd.c
diff options
context:
space:
mode:
Diffstat (limited to 'cmd.c')
-rw-r--r--cmd.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/cmd.c b/cmd.c
index 4887d18..e75c313 100644
--- a/cmd.c
+++ b/cmd.c
@@ -204,5 +204,10 @@ struct cgit_cmd *cgit_get_cmd(void)
for (i = 0; i < sizeof(cmds)/sizeof(*cmds); i++)
if (!strcmp(ctx.qry.page, cmds[i].name))
return &cmds[i];
+
+ char *redirect = fmtalloc("/git/%s/tree/%s%s%s", ctx.qry.repo, ctx.qry.page, ctx.qry.path ? "/" : "", ctx.qry.path ? ctx.qry.path : "");
+ cgit_redirect(redirect, false);
+ free(redirect);
+
return NULL;
}