added support for virtual host based rewrites

Decoupled the param part of the virtual host as a follow up to some changes in the configuration.