Redirect non-existing links to Overleaf page

This commit is contained in:
yu-i-i
2024-12-12 18:20:38 +01:00
parent f0022392ac
commit 4345ff5a22
2 changed files with 5 additions and 1 deletions
+4
View File
@@ -1375,6 +1375,10 @@ async function initialize(webRouter, privateApiRouter, publicApiRouter) {
TokenAccessController.grantTokenAccessReadOnly
)
webRouter.get(['/learn*', '/templates*', '/blog*', '/latex*', '/for/*', '/contact*'], (req, res) => {
res.redirect(301, 'https://www.overleaf.com')
})
webRouter.get('/unsupported-browser', renderUnsupportedBrowserPage)
webRouter.get('*', ErrorController.notFound)
@@ -10,7 +10,7 @@ export default function HotkeysModalBottomText() {
// eslint-disable-next-line jsx-a11y/anchor-has-content, react/jsx-key
<a
onClick={() => eventTracking.sendMB('left-menu-hotkeys-template')}
href="/articles/overleaf-keyboard-shortcuts/qykqfvmxdnjf"
href="https://www.overleaf.com/latex/templates/overleaf-keyboard-shortcuts/pphdnzrwmttk"
target="_blank"
/>,
]}