0

I'm trying to redirect a path to an external URL:

<Route path="/google" element={<Navigate replace to={https://google.com} />} />

However, when I go to...

http://localhost:3000/google

...in my browser, I get redirected to this:

http://localhost:3000/google/https://google.com

How I am supposed to correctly redirect to an external URL using React Router v6?

Drew Reese
  • 165,259
  • 14
  • 153
  • 181
kecklabs
  • 13
  • 3

0 Answers0