fixed rewrite_url