diff --git a/src/Umbraco.Web.UI.Client/src/apps/app/app.element.ts b/src/Umbraco.Web.UI.Client/src/apps/app/app.element.ts index 10aec07725..5a4fcc7112 100644 --- a/src/Umbraco.Web.UI.Client/src/apps/app/app.element.ts +++ b/src/Umbraco.Web.UI.Client/src/apps/app/app.element.ts @@ -93,7 +93,15 @@ export class UmbAppElement extends UmbLitElement { sessionStorage.removeItem(UMB_STORAGE_REDIRECT_URL); currentRoute = savedRoute.endsWith('logout') ? currentRoute : savedRoute; } - history.replaceState(null, '', currentRoute); + + const url = new URL(currentRoute); + const isLocalRoute = url.origin === window.location.origin && url.pathname.startsWith(this.backofficePath); + + if (isLocalRoute) { + history.replaceState(null, '', url.pathname + url.search + url.hash); + } else { + window.location.href = url.toString(); + } }); }