Skip to content

Commit

Permalink
server: fix man page redirects
Browse files Browse the repository at this point in the history
  • Loading branch information
shcheklein committed Aug 9, 2019
1 parent a13ba82 commit f40150b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion server.js
Original file line number Diff line number Diff line change
Expand Up @@ -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') {
Expand Down

0 comments on commit f40150b

Please sign in to comment.