Skip to content

How to navigate to basename (root route)? #10679

Closed Answered by brophdawg11
antonisprovidakis asked this question in Q&A
Discussion options

You must be logged in to vote

What version of react router are you using? We did some work a while back to let you control this via inclusion or exclusion in basename:

  • <BrowserRouter basename="/backend"> would make <Link to="/"> go to /backend
  • <BrowserRouter basename="/backend/"> would make <Link to="/"> go to /backend/

If it's not working on the latest for you could you provide a reproduction? It seemed to work for me in a quick local test.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@antonisprovidakis
Comment options

@brophdawg11
Comment options

@antonisprovidakis
Comment options

Answer selected by antonisprovidakis
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants