Ability to use variables in replacement strings for rewrite middleware.

Oh snap. I think I confused `replacement` with the original URL. I will correct this.