Issue with redirects MERN

I am having troubles deploying a full stack application. I am using a web service for the backend and a static site for the frontend.

I have added a _redirects file to my public folder and also a redirect rule on Render (screenshots attached).

My application has 2 pages:

  • Home Page: with Login component

*Chat Page

When a user submits the login or sign up form, they should be redirected to the Chats Page. However, they are being redirected to the home page and the login is not taking place, as no user is being stored in the LocalStorage.

The application is working as it should in my local machine. Any guidance to resolve this would be greatly appreciated!

Hi,

If you’re using client-side routing the action should be set to Rewrite, not Redirect.

Alan

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.