Ability to use variables in replacement strings for rewrite middleware.

This will be very slow