diff options
author | Raymaekers Luca <raymaekers.luca@gmail.com> | 2024-09-29 13:25:42 +0200 |
---|---|---|
committer | Raymaekers Luca <raymaekers.luca@gmail.com> | 2024-09-29 13:25:42 +0200 |
commit | ae1c8c5555c66ac00c713167067d946e08652816 (patch) | |
tree | b9a3af16c503946efcca9f7a7c641ebcdd92e2a0 | |
parent | 07ace53ba2423f1b7e62477549ba62a30e79ff47 (diff) |
Added / -> /ideas/ redirection
-rw-r--r-- | main.go | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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, ""}) }) |