fixing rewrite rules for restful web services