Rewrite connection string