Replace host to the other.
npm install @jswork/replace-host
import replaceHost from '@jswork/replace-host';
const url1 = 'https://aot-report-h5.dev.com/offline_asc_mobile?task_id=16807';
const url2 = 'https://sandbox-aot-report-h5.dev.com';
replaceHost(url1, url2);
// https://sandbox-aot-report-h5.dev.com/offline_asc_mobile?task_id=16807
Code released under the MIT license.