removed code; added it to rewrite rule instead