Ability to use variables in replacement strings for rewrite middleware.

Have you considered using 

http://golang.org/pkg/text/template/

?