diff --git a/server/index.js b/server/index.js index d4f89866..7a094dd6 100755 --- a/server/index.js +++ b/server/index.js @@ -130,7 +130,8 @@ app.use('/', router); app.use('/assets', express.static(publicPath + '/assets')); app.use(function (req, res, next) { - res.status(404).redirect("/404"); + res.status(404); + res.redirect("/404"); }) db.on('error',function(err) { diff --git a/server/routing/router.js b/server/routing/router.js index 6a977985..fcd9d243 100644 --- a/server/routing/router.js +++ b/server/routing/router.js @@ -70,10 +70,15 @@ function channel(req, res, next) { res.sendFile(path.join(pathThumbnails, '/public/assets/html/callback.html')); } else { var data = { + title: "404: File Not Found", list_name: capitalizeFirstLetter(req.params.channel_name), year: 2017, javascript_file: "main.min.js" } + if(req.params.channel_name == "404") { + res.status(404); + } + res.render('layouts/channel', data); } }