func redirectToCanonicalHost(w http.ResponseWriter, r *http.Request) {
	t := canonicalHost + r.URL.Path
	http.Redirect(w, r, t, http.StatusMovedPermanently)
	if _, err := fmt.Fprintf(w, `<a href="%s">Redirecting...</a>`, t); err != nil {
		log.Println("error writing response:", err.Error())
	}
}
// redirectToCanonicalHost responds with a redirect to the canonical host.
redirectToCanonicalHost responds with a redirect to the canonical host.
// redirectToCanonicalHost responds with a redirect to the canonical host .
func redirectToCanonicalHost(w http.ResponseWriter, r *http.Request) {
	t := canonicalHost + r.URL.Path
	http.Redirect(w, r, t, http.StatusMovedPermanently)
	if _, err := fmt.Fprintf(w, `<a href="%s">Redirecting...</a>`, t); err != nil {
		log.Println("error writing response:", err.Error())
	}
}
func redirectToCanonicalHost ( w http . ResponseWriter , r * http . Request ) { t := canonicalHost + r . URL . Path http . Redirect ( w , r , t , http . StatusMovedPermanently ) if _ , err := fmt . Fprintf ( w , `<a href="%s">Redirecting...</a>` , t ) ; err != nil { log . Println ( " " , err . Error ( ) ) } }
redirectToCanonicalHost responds with a redirect to the canonical host.
redirectToCanonicalHost responds with a redirect to the canonical host .