Updated rewrite rule and vIT foreach