Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
package redirect
import (
"net/http"
)
func init() {
http.HandleFunc("/", handler)
}
func handler(w http.ResponseWriter, r *http.Request) {
http.Redirect(w, r, "http://thaicrew.wordpress.com"+r.URL.RequestURI(), http.StatusMovedPermanently)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.