mirror of https://github.com/perkeep/perkeep.git
website: redirect bare /dl to /download
Change-Id: Ie5f249d478fcb589824c056bf61c7af7c54155ab
This commit is contained in:
parent
01eb400955
commit
33ce243eb9
|
@ -889,6 +889,10 @@ func gerritRedirect(w http.ResponseWriter, r *http.Request) {
|
|||
}
|
||||
|
||||
func releaseRedirect(w http.ResponseWriter, r *http.Request) {
|
||||
if r.URL.Path == "/dl" || r.URL.Path == "/dl/" {
|
||||
http.Redirect(w, r, "https://camlistore.org/download/", http.StatusFound)
|
||||
return
|
||||
}
|
||||
dest := "https://storage.googleapis.com/camlistore-release/"
|
||||
if len(r.URL.Path) > len("/dl/") {
|
||||
dest += r.URL.Path[1:]
|
||||
|
|
Loading…
Reference in New Issue