mirror of
https://github.com/openshwprojects/OpenBK7231T_App.git
synced 2026-02-09 23:45:32 +00:00
Merge pull request #8 from talltechdude/feat/index-redirect
feat: redirect root page / to /index page
This commit is contained in:
@ -873,11 +873,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