w http.ResponseWriter,
req *http.Request,
) (bool, error) {
- if host == "habrastorage.org" && strings.Contains(req.URL.Path, "r/w780q1/") {
+ if ((host == "habrastorage.org") || (host == "hsto.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 false, nil