mirror of
https://github.com/openshwprojects/OpenBK7231T_App.git
synced 2026-02-10 10:25:48 +00:00
feat: redirect root page / to /index page
This commit is contained in:
@ -872,11 +872,14 @@ int HTTP_ProcessPacket(const char *recvbuf, char *outbuf, int outBufSize, http_s
|
||||
strcat(outbuf,htmlReturnToMenu);
|
||||
HTTP_AddBuildFooter(outbuf,outBufSize);
|
||||
strcat(outbuf,htmlEnd);
|
||||
} else if(http_checkUrlBase(urlStr,"")) {
|
||||
// Redirect / to /index page
|
||||
strcat(outbuf,"HTTP/1.1 302 OK\nLocation: /index\nConnection: close\n\n");
|
||||
} else {
|
||||
http_setup(outbuf, httpMimeTypeHTML);
|
||||
strcat(outbuf,htmlHeader);
|
||||
strcat_safe(outbuf,g_header,outBufSize);
|
||||
strcat(outbuf,"Not found.");
|
||||
strcat(outbuf,"Not found.<br>\n");
|
||||
strcat(outbuf,htmlReturnToMenu);
|
||||
HTTP_AddBuildFooter(outbuf,outBufSize);
|
||||
strcat(outbuf,htmlEnd);
|
||||
|
||||
Reference in New Issue
Block a user