Skip to content

Commit

Permalink
Return 301 on path not found instead of 404
Browse files Browse the repository at this point in the history
  • Loading branch information
t94j0 committed Mar 14, 2022
1 parent ae3e1d9 commit 7fd8398
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion satellite/handlers/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ func (h RootHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) {
log.Error(err)
}
if !served {
h.log(req, 404)
log.Debug("File not found. Redirecting to not_found")
h.log(req, 301)
h.notExistHandler(w, req)
} else {
h.log(req, 200)
Expand Down

0 comments on commit 7fd8398

Please sign in to comment.