Registry /
networking / aaronland-go-http-rewrite
Install & Compatibility
Where this runs
No compatibility data collected yet for this library.
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
rewrite
✓ github.com/aaronland/go-http-rewrite
Creates a rewrite handler that redirects /old to /new.
package main
import (
"net/http"
"github.com/aaronland/go-http-rewrite"
)
func main() {
mux := http.NewServeMux()
rewriteHandler := rewrite.NewRewriteHandler(mux, "/old", "/new")
http.ListenAndServe(":8080", rewriteHandler)
}
Debug
Known issues
No known issues recorded.
Upgrade
Version history
1.1.2latest on pkg.go.dev
Audit
Dependencies
No dependency data recorded yet.