Added rewrite parameter to add to vhosts that require it