Preserve query parameters when rewriteruling