> Before:
this.accountPage = http://localhost:4502/content/flagtick/us/en/my-account.html;
> Process:
const index = this.accountPage.lastIndexOf('/') + 1;
const fileName = this.accountPage.substr(index);
console.log(this.accountPage.replace(fileName, 'errors/404.html'));
> After:
this.accountPage = http://localhost:4502/content/flagtick/us/en/errors/404.html;