support custom rewrite rule