aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/main.go b/main.go
index b8aef22..b29b8eb 100644
--- a/main.go
+++ b/main.go
@@ -178,6 +178,10 @@ func main() {
fs := http.FileServer(http.Dir("assets/"))
mux.Handle("/static/", http.StripPrefix("/static/", fs))
+ mux.HandleFunc("GET /{$}", func(w http.ResponseWriter, r *http.Request) {
+ http.Redirect(w, r, "/ideas/", http.StatusMovedPermanently)
+ })
+
mux.HandleFunc("GET /ideas/", func(w http.ResponseWriter, r *http.Request) {
tmpl.Execute(w, PageData{Ideas, ""})
})