Closed jnordberg closed 4 years ago
When in a nested route it would be handy to be able to redirect relative to the current nested route. Perhaps something like this?
<Route> <Route path="/"> <p>Root</p> </Route> <Route path="/sub/*"> <!-- this would redirect to /sub/one instead of /one --> <Route path="/" relative-redirect="/one" /> <Route path="/one">One</Route> <Route path="/two">Two</Route> </Route> </Route>
Alternatively a redirect="one" (without the leading slash) could be treated as relative
redirect="one"
implemented in v.0.3.0
<Route path="/sub/noaccess" redirect="subpage" /> will redirect to /sub/subpage.
<Route path="/sub/noaccess" redirect="subpage" />
/sub/subpage
When in a nested route it would be handy to be able to redirect relative to the current nested route. Perhaps something like this?
Alternatively a
redirect="one"
(without the leading slash) could be treated as relative