René's URL Explorer Experiment


Title: fix(@angular/ssr): resolve relative redirects against the parent route by bschaeublin · Pull Request #34301 · angular/angular-cli · GitHub

Open Graph Title: fix(@angular/ssr): resolve relative redirects against the parent route by bschaeublin · Pull Request #34301 · angular/angular-cli

X Title: fix(@angular/ssr): resolve relative redirects against the parent route by bschaeublin · Pull Request #34301 · angular/angular-cli

Description: Fixes #34300 PR Checklist Please check to confirm your PR fulfills the following requirements: The commit message follows our guidelines: https://github.com/angular/angular-cli/blob/main/CONTRIBUTING.md#-commit-message-guidelines Tests for the changes have been added (for bug fixes / features) Docs have been added / updated (for bug fixes / features) PR Type What kind of change does this PR introduce? Bugfix Feature Code style update (formatting, local variables) Refactoring (no functional changes, no api changes) Build related changes CI related changes Documentation content changes Other... Please describe: What is the current behavior? Issue Number: #34300 A relative redirectTo is resolved on the server by removing only the last segment of the full route path. For a route whose own path has several segments, { path: 'old/page', redirectTo: 'new/page' } redirects /old/page to /old/new/page, while the router navigates to /new/page, as it replaces all segments matched by the route. What is the new behavior? Relative redirects are resolved against the parent route path, which traverseRoutesConfig already passes down. This matches the router for multi-segment paths, empty paths and catch-all routes, including prerendered routes with getPrerenderParams, where the parameters are substituted into the parent path (previously a ** expanded to several segments shifted the base, e.g. docs/** with a/b redirected to /docs/a/new instead of /new). Single-segment and empty-path routes resolve exactly as before. Does this PR introduce a breaking change? Yes No This changes the redirect target only for relative redirects on routes whose own path has more than one segment. The previous target was never a URL the router would navigate to, so this is treated as a fix. The two app_spec.ts expectations that asserted the previous result (redirect/relative → /redirect/home, redirect/:param/relative → /redirect/param/home) now expect the router's result /home. If you consider this breaking, I'm happy to adjust. Other information Tests: new cases in ng-routes_spec.ts (multi-segment path under a parameter, prerendered multi-segment path with getPrerenderParams, prerendered ** with getPrerenderParams) and app_spec.ts (relative redirect under a parameterized parent route through app.handle). Verified locally with //packages/angular/ssr/test:test, the tests/build/server-rendering e2e tests (esbuild, Node 24) and ng-dev release build. Not covered by this change: positional parameters in redirectTo itself (redirectTo: 'profile/:id') are still emitted literally, as before. Related: #34299 (query string on relative redirects, #34298). Both change the end of resolveRedirectTo, so whichever lands second needs a small rebase.

Open Graph Description: Fixes #34300 PR Checklist Please check to confirm your PR fulfills the following requirements: The commit message follows our guidelines: https://github.com/angular/angular-cli/blob/main/CONTRIB...

X Description: Fixes #34300 PR Checklist Please check to confirm your PR fulfills the following requirements: The commit message follows our guidelines: https://github.com/angular/angular-cli/blob/main/CONTRIB...

Opengraph URL: https://github.com/angular/angular-cli/pull/34301

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:f7961586-6a0e-7c89-1324-7ce1b22ef396
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idA492:27702B:192169:22D863:6AFDDA3E
html-safe-nonce58798670375eead1eab839fc73661ca5214ccc5ed2b1e10df6b870573df7967d
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNDkyOjI3NzAyQjoxOTIxNjk6MjJEODYzOjZBRkREQTNFIiwidmlzaXRvcl9pZCI6IjczNjAzMDI0MTc3NzYwNzMyNzgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac312832c9adaa4db8b4d49e1d6e1cc9ac6eaf7bd1cd1e05937c9393f6ec64ad15
hovercard-subject-tagpull_request:4806101439
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/angular/angular-cli/pull/34301/files
twitter:imagehttps://avatars.githubusercontent.com/u/11610660?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/11610660?s=400&v=4
og:image:altFixes #34300 PR Checklist Please check to confirm your PR fulfills the following requirements: The commit message follows our guidelines: https://github.com/angular/angular-cli/blob/main/CONTRIB...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None9918bd4004419458bcd838065ac2a76b76ebd11705d73909fff5ab99e996fa23
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/angular/angular-cli git https://github.com/angular/angular-cli.git
octolytics-dimension-user_id139426
octolytics-dimension-user_loginangular
octolytics-dimension-repository_id36891867
octolytics-dimension-repository_nwoangular/angular-cli
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id36891867
octolytics-dimension-repository_network_root_nwoangular/angular-cli
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasea231c174493a6a442c0b0544475c918b30128208
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/angular/angular-cli/pull/34301/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fangular%2Fangular-cli%2Fpull%2F34301%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fangular%2Fangular-cli%2Fpull%2F34301%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=angular%2Fangular-cli
Reloadhttps://github.com/angular/angular-cli/pull/34301/files
Reloadhttps://github.com/angular/angular-cli/pull/34301/files
Reloadhttps://github.com/angular/angular-cli/pull/34301/files
angularhttps://github.com/angular
angular-clihttps://github.com/angular/angular-cli
Codehttps://github.com/angular/angular-cli
Issues196 (196)https://github.com/angular/angular-cli/issues
Pull requests20 (20)https://github.com/angular/angular-cli/pulls
Actionshttps://github.com/angular/angular-cli/actions
Security and quality8 (8)https://github.com/angular/angular-cli/security
Insightshttps://github.com/angular/angular-cli/insights
Sign up for GitHub https://github.com/signup?return_to=%2Fangular%2Fangular-cli%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fangular%2Fangular-cli%2Fissues%2Fnew%2Fchoose
alan-agius4https://github.com/alan-agius4
angular:mainhttps://github.com/angular/angular-cli/tree/main
bschaeublin:fix/ssr-relative-redirect-basehttps://github.com/bschaeublin/angular-cli/tree/fix/ssr-relative-redirect-base
Conversation 10 https://github.com/angular/angular-cli/pull/34301
Commits 2 https://github.com/angular/angular-cli/pull/34301/commits
Checks 39 https://github.com/angular/angular-cli/pull/34301/checks
Files changed https://github.com/angular/angular-cli/pull/34301/files
Please reload this pagehttps://github.com/angular/angular-cli/pull/34301/files
fix(@angular/ssr): resolve relative redirects against the parent route https://github.com/angular/angular-cli/pull/34301/files#top
Show all changes 2 commits https://github.com/angular/angular-cli/pull/34301/files
816ad70 fix(@angular/ssr): resolve relative redirects against the parent route bschaeublin Oct 9, 2026 https://github.com/angular/angular-cli/pull/34301/commits/816ad70c6a4abb63af76ef6639016db708adba9d
e9bfb52 fixup! fix(@angular/ssr): resolve relative redirects against the pare… bschaeublin Oct 12, 2026 https://github.com/angular/angular-cli/pull/34301/commits/e9bfb523c67eb28479d8979e3139fd0fafebe98b
Clear filters https://github.com/angular/angular-cli/pull/34301/files
Please reload this pagehttps://github.com/angular/angular-cli/pull/34301/files
Please reload this pagehttps://github.com/angular/angular-cli/pull/34301/files
ng-routes.ts https://github.com/angular/angular-cli/pull/34301/files#diff-fc750eeef1ce9e348f16a8ca827e2031d90c9f8b1ac129adf353e2cd74447f1b
app_spec.ts https://github.com/angular/angular-cli/pull/34301/files#diff-fe02aa4a8c3c5a40e80d93a8b2d4a51bb2a6df36d3b1ee5533a6167e02e18ff5
ng-routes_spec.ts https://github.com/angular/angular-cli/pull/34301/files#diff-cb5be939ccf7ec9153bee6fdbe2965ebdcdf302ddc7c148b8f897f193714c345
packages/angular/ssr/src/routes/ng-routes.tshttps://github.com/angular/angular-cli/pull/34301/files#diff-fc750eeef1ce9e348f16a8ca827e2031d90c9f8b1ac129adf353e2cd74447f1b
View file https://github.com/bschaeublin/angular-cli/blob/e9bfb523c67eb28479d8979e3139fd0fafebe98b/packages/angular/ssr/src/routes/ng-routes.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/angular/angular-cli/pull/34301/{{ revealButtonHref }}
https://github.com/angular/angular-cli/pull/34301/files#diff-fc750eeef1ce9e348f16a8ca827e2031d90c9f8b1ac129adf353e2cd74447f1b
https://github.com/angular/angular-cli/pull/34301/files#diff-fc750eeef1ce9e348f16a8ca827e2031d90c9f8b1ac129adf353e2cd74447f1b
https://github.com/angular/angular-cli/pull/34301/files#diff-fc750eeef1ce9e348f16a8ca827e2031d90c9f8b1ac129adf353e2cd74447f1b
https://github.com/angular/angular-cli/pull/34301/files#diff-fc750eeef1ce9e348f16a8ca827e2031d90c9f8b1ac129adf353e2cd74447f1b
https://github.com/angular/angular-cli/pull/34301/files#diff-fc750eeef1ce9e348f16a8ca827e2031d90c9f8b1ac129adf353e2cd74447f1b
https://github.com/angular/angular-cli/pull/34301/files#diff-fc750eeef1ce9e348f16a8ca827e2031d90c9f8b1ac129adf353e2cd74447f1b
https://github.com/angular/angular-cli/pull/34301/files#diff-fc750eeef1ce9e348f16a8ca827e2031d90c9f8b1ac129adf353e2cd74447f1b
https://github.com/angular/angular-cli/pull/34301/files#diff-fc750eeef1ce9e348f16a8ca827e2031d90c9f8b1ac129adf353e2cd74447f1b
https://github.com/angular/angular-cli/pull/34301/files#diff-fc750eeef1ce9e348f16a8ca827e2031d90c9f8b1ac129adf353e2cd74447f1b
https://github.com/angular/angular-cli/pull/34301/files#diff-fc750eeef1ce9e348f16a8ca827e2031d90c9f8b1ac129adf353e2cd74447f1b
Please reload this pagehttps://github.com/angular/angular-cli/pull/34301/files
https://github.com/angular/angular-cli/pull/34301/files#diff-fc750eeef1ce9e348f16a8ca827e2031d90c9f8b1ac129adf353e2cd74447f1b
https://github.com/angular/angular-cli/pull/34301/files#diff-fc750eeef1ce9e348f16a8ca827e2031d90c9f8b1ac129adf353e2cd74447f1b
https://github.com/angular/angular-cli/pull/34301/files#diff-fc750eeef1ce9e348f16a8ca827e2031d90c9f8b1ac129adf353e2cd74447f1b
packages/angular/ssr/test/app_spec.tshttps://github.com/angular/angular-cli/pull/34301/files#diff-fe02aa4a8c3c5a40e80d93a8b2d4a51bb2a6df36d3b1ee5533a6167e02e18ff5
View file https://github.com/bschaeublin/angular-cli/blob/e9bfb523c67eb28479d8979e3139fd0fafebe98b/packages/angular/ssr/test/app_spec.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/angular/angular-cli/pull/34301/{{ revealButtonHref }}
https://github.com/angular/angular-cli/pull/34301/files#diff-fe02aa4a8c3c5a40e80d93a8b2d4a51bb2a6df36d3b1ee5533a6167e02e18ff5
https://github.com/angular/angular-cli/pull/34301/files#diff-fe02aa4a8c3c5a40e80d93a8b2d4a51bb2a6df36d3b1ee5533a6167e02e18ff5
https://github.com/angular/angular-cli/pull/34301/files#diff-fe02aa4a8c3c5a40e80d93a8b2d4a51bb2a6df36d3b1ee5533a6167e02e18ff5
https://github.com/angular/angular-cli/pull/34301/files#diff-fe02aa4a8c3c5a40e80d93a8b2d4a51bb2a6df36d3b1ee5533a6167e02e18ff5
packages/angular/ssr/test/routes/ng-routes_spec.tshttps://github.com/angular/angular-cli/pull/34301/files#diff-cb5be939ccf7ec9153bee6fdbe2965ebdcdf302ddc7c148b8f897f193714c345
View file https://github.com/bschaeublin/angular-cli/blob/e9bfb523c67eb28479d8979e3139fd0fafebe98b/packages/angular/ssr/test/routes/ng-routes_spec.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/angular/angular-cli/pull/34301/{{ revealButtonHref }}
https://github.com/angular/angular-cli/pull/34301/files#diff-cb5be939ccf7ec9153bee6fdbe2965ebdcdf302ddc7c148b8f897f193714c345
https://github.com/angular/angular-cli/pull/34301/files#diff-cb5be939ccf7ec9153bee6fdbe2965ebdcdf302ddc7c148b8f897f193714c345
https://github.com/angular/angular-cli/pull/34301/files#diff-cb5be939ccf7ec9153bee6fdbe2965ebdcdf302ddc7c148b8f897f193714c345
https://github.com/angular/angular-cli/pull/34301/files#diff-cb5be939ccf7ec9153bee6fdbe2965ebdcdf302ddc7c148b8f897f193714c345
Please reload this pagehttps://github.com/angular/angular-cli/pull/34301/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.