Added redirect logic
Signed-off-by: Marcus Noble <github@marcusnoble.co.uk>
This commit is contained in:
parent
db94ace86e
commit
1b2e0d7501
3
app.js
3
app.js
@ -30,6 +30,9 @@ app.use(express.static(__dirname + '/build'));
|
||||
// Lets try and slow down some of those exploit crawlers
|
||||
app.use("/", require('./filterRoutes'));
|
||||
|
||||
// Redirects
|
||||
app.use("/", require('./redirects'));
|
||||
|
||||
// Handle some iOS icon 404s
|
||||
app.get("/apple-touch-icon*", function(req, res) {
|
||||
res.sendFile(__dirname + '/build/images/favico/' + req.url, () => {
|
||||
|
8
redirects.js
Normal file
8
redirects.js
Normal file
@ -0,0 +1,8 @@
|
||||
const express = require('express');
|
||||
const router = express.Router();
|
||||
|
||||
router.get('2022-07-04-managing-kubernetes-without-loosing-your-cool', function(req, res) {
|
||||
return res.redirect("/2022-07-04-managing-kubernetes-without-losing-your-cool/")
|
||||
});
|
||||
|
||||
module.exports = router
|
Loading…
Reference in New Issue
Block a user