fix rewrite urls