escape the query for rewritecond