redirect /portal to /portal/index.html

This commit is contained in:
Seven Du 2013-08-13 09:28:14 +08:00
parent f1540c6326
commit 3bd1395149
1 changed files with 6 additions and 0 deletions

View File

@ -704,6 +704,12 @@ abyss_bool auth_hook(TSession * r)
return websocket_hook(r);
}
if (!strncmp(r->requestInfo.uri, "/portal", 7) && strlen(r->requestInfo.uri) <= 8) {
ResponseAddField(r, "Location", "/portal/index.html");
ResponseStatus(r, 302);
return TRUE;
}
if (!strncmp(r->requestInfo.uri, "/domains/", 9)) {
domain_name = strdup(r->requestInfo.uri + 9);
switch_assert(domain_name);