redirect fix
This commit is contained in:
@@ -98,7 +98,13 @@ func main() {
|
|||||||
flag.Parse()
|
flag.Parse()
|
||||||
|
|
||||||
http.HandleFunc("/styles.css", Styles)
|
http.HandleFunc("/styles.css", Styles)
|
||||||
http.HandleFunc("/", About)
|
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
|
||||||
|
if r.URL.Path != "/" {
|
||||||
|
http.Redirect(w, r, "/", http.StatusFound)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
About(w, r)
|
||||||
|
})
|
||||||
//http.HandleFunc("/portfolio", Portfolio)
|
//http.HandleFunc("/portfolio", Portfolio)
|
||||||
http.HandleFunc("/infra", Infra)
|
http.HandleFunc("/infra", Infra)
|
||||||
http.HandleFunc("/finance", Finance)
|
http.HandleFunc("/finance", Finance)
|
||||||
|
|||||||
Reference in New Issue
Block a user