I have a react application that is hosted inside another application that manages authentication.
In my application I can see via a web service if the user is authenticated or not.
What I want to do is redirect the user to the main application if they are not authenticated.
My homepage is something like: "/BigApp/MyApp"
I would like to redirect the user to "/BigApp"
which will handle the authentication.
BigApp is not part of MyApp, it just has a link to MyApp.
I already tried using Redirect and tried to go up one level.
From what I understand Redirect only works with the components you have given a route.
import { Redirect } from 'react-router-dom'
...
<Redirect to='../' />
When it redirects it stays in the same URL "/BigApp/MyApp"
Is there any way to achieve this using react router?