Allowing regex based rewriterules to be applied on redirects

With regex based rewrites we can configure fine tuned redirect routing.
Could be generalized to allow rewrites on general routing and proxying as well.