diff --git a/server.js b/server.js index 5bed7a9d4d..3fb07ec405 100644 --- a/server.js +++ b/server.js @@ -24,7 +24,9 @@ app.prepare().then(() => { const chat = /^\/(help|chat)\/?$/i if (req.headers.host === 'man.dvc.org') { - const doc_pathname = '/doc/commands-reference' + pathname + let normalized_pathname = + pathname !== '/import-url' ? pathname.replace(/-/i, '/') : pathname + const doc_pathname = '/doc/commands-reference' + normalized_pathname res.writeHead(301, { Location: 'https://dvc.org' + doc_pathname }) res.end() } else if (req.headers.host === 'pycon2019.dvc.org') {