How to do 404 page and under what circumstances jump to 404 page
业精于勤,荒于嬉;行成于思,毁于随。
How to implement
koa
app.use(async ctx => { ctx.status = 404; ctx.body = await readSmallFile('./404.html'); });
Status code 404 means NOT FOUND, probably
NOT FOUND
The address link is wrong;
The corresponding page cannot be found on the server;
Generally, you can design a separate page for 404; 404 not found is just a friendly reminder to the user that the page cannot be accessed.
not found
How to implement
koa
Status code 404 means
NOT FOUND
, probablyThe address link is wrong;
The corresponding page cannot be found on the server;
Generally, you can design a separate page for 404; 404
not found
is just a friendly reminder to the user that the page cannot be accessed.