diff --git a/server.go b/server.go index 3efc659..1e355e9 100644 --- a/server.go +++ b/server.go @@ -10,7 +10,7 @@ import ( ) func viewHandler(root string, w http.ResponseWriter, r *http.Request) { - file := filepath.Join(root, r.URL.Path[1:]) + file := filepath.Join(root, filepath.FromSlash(r.URL.Path[1:])) info, err := os.Stat(file) if err != nil { fmt.Fprint(w, err)