diff --git a/src/main/java/tk/SinTan1729/url/Routes.java b/src/main/java/tk/SinTan1729/url/Routes.java index 5cd2b6a..42c6037 100644 --- a/src/main/java/tk/SinTan1729/url/Routes.java +++ b/src/main/java/tk/SinTan1729/url/Routes.java @@ -58,7 +58,7 @@ public class Routes { .findForShortUrl(shortUrl); if (longUrlOpt.isEmpty()) { - res.status(404); + res.redirect("404.html"); return ""; } urlRepository.addHit(shortUrl); diff --git a/src/main/resources/public/404.html b/src/main/resources/public/404.html new file mode 100644 index 0000000..f3e56f2 --- /dev/null +++ b/src/main/resources/public/404.html @@ -0,0 +1,14 @@ + + + +
+