Feature(pages): Add 404 page
To prevent loops, server errors will lead here instead of map page This page can be static to prevent infinite loops closes #9463
This commit is contained in:
@ -16,9 +16,9 @@ export default function redirectLang(app) {
|
||||
|
||||
if (supportedLanguages[langCode]) {
|
||||
req.flash('errors', {
|
||||
msg: `404: We couldn't find path ${ path }`
|
||||
msg: `We couldn't find path ${ path }`
|
||||
});
|
||||
return res.redirect('/map');
|
||||
return res.render('404', { title: '404'});
|
||||
}
|
||||
|
||||
// language aware redirect
|
||||
|
20
server/views/404.jade
Normal file
20
server/views/404.jade
Normal file
@ -0,0 +1,20 @@
|
||||
extends ./layout
|
||||
|
||||
block content
|
||||
.spacer
|
||||
.row
|
||||
.col-sm-6.col-sm-offset-3
|
||||
hr
|
||||
.text-center
|
||||
h1 404
|
||||
.row
|
||||
.col-sm-6.col-sm-offset-3
|
||||
.text-center
|
||||
h2 Ooops, we couldn't find that page.
|
||||
.spacer
|
||||
.row
|
||||
.col-sm-6.col-sm-offset-3
|
||||
.text-center
|
||||
a.btn.signup-btn.btn-block(href='/map') Head to the Map
|
||||
hr
|
||||
.spacer
|
Reference in New Issue
Block a user