generate rewrite.go for url remapping