doesnt rewrite to correct url