diff --git a/src/hooks/useLegacyUrlRedirector.ts b/src/hooks/useLegacyUrlRedirector.ts index 35018c66..85c63c05 100644 --- a/src/hooks/useLegacyUrlRedirector.ts +++ b/src/hooks/useLegacyUrlRedirector.ts @@ -9,6 +9,9 @@ export const useLegacyUrlRedirector = () => { if (pathname.startsWith(URL_BASE_PATH + '/') && hash.startsWith('#/')) { let newPath = '/' + hash.substring(2); // Remove '#/' and concatenate + // Remove the query string part + newPath = newPath.split('?')[0]; + // If it contains '/build-configs/', remove everything between '/pnc-web/' and '/build-configs/' const buildConfigsIndex = newPath.indexOf('/build-configs/'); if (buildConfigsIndex !== -1) {