summaryrefslogtreecommitdiffhomepage
path: root/cmd
diff options
context:
space:
mode:
authorIan Lewis <ianmlewis@gmail.com>2019-07-10 01:41:06 -0400
committerIan Lewis <ianlewis@google.com>2019-08-07 08:32:20 +0900
commit000ed17d48a09821c23eddac5087197fd1692e14 (patch)
tree64a648729d5b2a1805d3c9ae2b493d025ffbe7a3 /cmd
parent41ac85ff2fbbf73af87284f018e30a671adfd127 (diff)
Add redirect from old URL.
- Adds url redirect from old syscall docs url to new url - make server now runs the Go server and implements redirects. - make devserver runs the hugo dev server.
Diffstat (limited to 'cmd')
-rw-r--r--cmd/gvisor-website/main.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/cmd/gvisor-website/main.go b/cmd/gvisor-website/main.go
index dd6058081..be23854a1 100644
--- a/cmd/gvisor-website/main.go
+++ b/cmd/gvisor-website/main.go
@@ -36,8 +36,11 @@ var redirects = map[string]string{
"/pr": "https://github.com/google/gvisor/pulls",
// Redirects to compatibility docs.
- "/c": "/docs/user_guide/compatibility",
- "/c/linux/amd64": "/docs/user_guide/compatibility/linux/amd64",
+ "/c": "/docs/user_guide/compatibility/",
+ "/c/linux/amd64": "/docs/user_guide/compatibility/linux/amd64/",
+ // Redirect for old url
+ "/docs/user_guide/compatibility/amd64": "/docs/user_guide/compatibility/linux/amd64/",
+ "/docs/user_guide/compatibility/amd64/": "/docs/user_guide/compatibility/linux/amd64/",
// Deprecated, but links continue to work.
"/cl": "https://gvisor-review.googlesource.com",
@@ -230,5 +233,6 @@ func main() {
registerRebuild(nil)
registerStatic(nil, *staticDir)
+ log.Printf("Listening on %s...", *addr)
log.Fatal(http.ListenAndServe(*addr, nil))
}