0

I am using react router. Assume I am in /dashboard route.

Now if I refresh the page, request will go to the server. And server redirects to /. What happens here is, I am navigated to / route, instead of /dashboard.

What I want is, When I refresh the page, I want to navigate to the same route instead of navigating to /.

Can anyone help me in resolving this issue?

XPD
  • 1,121
  • 1
  • 13
  • 26
sai teja
  • 1
  • 1
  • [possible answer](https://stackoverflow.com/a/51332885/5490517) – Morta1 Dec 27 '19 at 12:12
  • Your client needs to handle the fact that the app is being loaded from a non-root URL, please show at least your client router code. – James Dec 27 '19 at 15:36
  • @James I am just creating routes, I am not handling anything in the client. Can you tell me the way to handle the routes on the client-side? My routes look like this : – sai teja Dec 30 '19 at 04:17

1 Answers1

0

Sorry this is my production server configuration issue

we are redirecting "/" from the server for all get routes instead of sending the "index.html" file.

sai teja
  • 1
  • 1