fix referer rewriter