Skip to content

[Start] Rendered notFound route then redirects to basepath with trailing slash when basepath is set #4105

@hokkyss

Description

@hokkyss

Which project does this relate to?

Start

Describe the bug

When customizing basepath in createRouter and visiting /, the router first renders not found and then redirects to /basepath/ (with trailing slash even though trailing slash is disabled)

Your Example Website or App

https://codesandbox.io/p/devbox/unruffled-hodgkin-8y6p2q?workspaceId=ws_3crUW8RxweSdTKWh8AMbfP

Steps to Reproduce the Bug or Issue

Remove /basepath from URL manually.

Expected behavior

One of the two:

  1. Smoothly rendering /basepath/ without showing not found
  2. Render not found and not redirecting to /basepath/

Screenshots or Videos

Screen.Recording.2025-05-07.at.11.58.42.mov

Platform

tanstack start basic example

  • OS: MacOS
  • Browser: Chrome
  • Version: 1.120.2

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions