diff --git a/cmd/godoc/dl.go b/cmd/godoc/dl.go new file mode 100644 index 00000000..bd738316 --- /dev/null +++ b/cmd/godoc/dl.go @@ -0,0 +1,14 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package main + +import "net/http" + +// Register a redirect handler for /dl/ to the golang.org download page. +// This file will not be included when deploying godoc to golang.org. + +func init() { + http.Handle("/dl/", http.RedirectHandler("http://golang.org/dl/", http.StatusFound)) +}