From fa4169e37b6d913cb3fd3e79ae1f00459399eccb Mon Sep 17 00:00:00 2001 From: thinkpadmaster Date: Fri, 21 Jul 2023 21:54:23 -0500 Subject: Redirect URLs ending it / to the URL without a trailing / --- main.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'main.go') diff --git a/main.go b/main.go index da578e4..6e9c95b 100644 --- a/main.go +++ b/main.go @@ -37,8 +37,11 @@ func main() { fs := http.FileServer(http.Dir("./static")) mux.Handle("/static/", http.StripPrefix("/static/", fs)) + mux.HandleFunc("/projects", app.post) mux.HandleFunc("/projects/", app.post) + mux.HandleFunc("/blog", app.post) mux.HandleFunc("/blog/", app.post) + mux.HandleFunc("/about", app.about) mux.HandleFunc("/about/", app.about) mux.HandleFunc("/", app.home) -- cgit v1.2.3