return
}
- if host == "habrastorage.org" &&
- strings.Contains(req.URL.Path, "/webt/") &&
- !strings.HasPrefix(req.URL.Path, "/webt/") {
- req.URL.Path = req.URL.Path[strings.Index(req.URL.Path, "/webt/"):]
+ if host == "habrastorage.org" && strings.Contains(req.URL.Path, "r/w780q1") {
+ req.URL.Path = strings.Replace(req.URL.Path, "r/w780q1/", "", 1)
http.Redirect(w, req, req.URL.String(), http.StatusFound)
return
}