diff --git a/core/corehttp/gateway_handler.go b/core/corehttp/gateway_handler.go index dde669c0e..c2c1917b6 100644 --- a/core/corehttp/gateway_handler.go +++ b/core/corehttp/gateway_handler.go @@ -144,6 +144,11 @@ func (i *gatewayHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { foundIndex := false for _, link := range nd.Links { if link.Name == "index.html" { + if urlPath[len(urlPath)-1] != '/' { + http.Redirect(w, r, urlPath+"/", 302) + return + } + log.Debug("found index") foundIndex = true // return index page instead.