implement / redirect
This commit is contained in:
parent
3a421829f1
commit
308aa11bf0
@ -91,6 +91,9 @@ func (this *WikiServer) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
|||||||
this.routeIndex(w, r)
|
this.routeIndex(w, r)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
} else if remainingPath == "" {
|
||||||
|
this.serveRedirect(w, this.opts.ExpectBaseURL+`view/`+url.QueryEscape(this.opts.DefaultPage))
|
||||||
|
return
|
||||||
|
|
||||||
} else if strings.HasPrefix(remainingPath, "view/") {
|
} else if strings.HasPrefix(remainingPath, "view/") {
|
||||||
articleTitle, err := url.QueryUnescape(remainingPath[len("view/"):])
|
articleTitle, err := url.QueryUnescape(remainingPath[len("view/"):])
|
||||||
|
Loading…
Reference in New Issue
Block a user