Redirect to search url with permalink params if rewrite is enabled