Infinite redirect when we refresh a rewrited subdomain route with a search param
Which project does this relate to?
Start
Describe the bug
The example makes a rewrite from subdomain www.localhost:3000 to localhost:3000/www
This works as expected, but when we involve search params and we refresh the tab it makes infinite 307 redirects to itself until the browser stops it. It could also happen without refreshing the page.
This works for router, but not for start.
Your Example Website or App
https://github.com/romulovalez/tanstack-start-issue
Steps to Reproduce the Bug or Issue
- Go to http://www.localhost:3000
- Press link
Go to root with some searchParam - If it hasn't fail yet, refresh the tab and it will fail making the 307 redirects to itself.
Expected behavior
It should load normally without making any redirect.
Screenshots or Videos
No response
Platform
- Start Version: 1.140.5
- OS: macOS
- Browser: Chrome
- Browser Version: 142.0.7444.176
- Bundler: vite
- Bundler Version: 7.1.7
Additional context
No response
๐ CodeRabbit Plan Mode
Generate an implementation plan and agent prompts for this issue.
- [ ] Create Plan
๐ Similar Issues
Possible Duplicates
Related Issues
๐ Related PRs
TanStack/router#5315 - fix: redirect respects rewrites [merged] TanStack/router#5523 - fix: server side redirects causd by default search param respect rewrite [merged]
๐ค Suggested Assignees
- schiller-manuel
- mantey-github
- andybons
๐งช Issue enrichment is currently in early access.
To disable automatic issue enrichment, add the following to your .coderabbit.yaml:
issue_enrichment:
auto_enrich:
enabled: false