router icon indicating copy to clipboard operation
router copied to clipboard

Infinite redirect when we refresh a rewrited subdomain route with a search param

Open romulovalez opened this issue 4 weeks ago โ€ข 1 comments

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

  1. Go to http://www.localhost:3000
  2. Press link Go to root with some searchParam
  3. 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

romulovalez avatar Dec 11 '25 00:12 romulovalez

๐Ÿ“ CodeRabbit Plan Mode

Generate an implementation plan and agent prompts for this issue.

  • [ ] Create Plan
Examples

๐Ÿ”— 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

coderabbitai[bot] avatar Dec 11 '25 00:12 coderabbitai[bot]