Direct link 403 issue

hello all,
I’ve got a static website react app Which locally and also previously on heroku worked differently… Which I’m trying to understand…
Navigating to home page, and then from there to anywhere else work as expected, but if tried to refresh or to navigate directly to any other page which is not the home page I got the 403 error.

home page woks fine
also navigate to any other page works fine…

Now try to navigate directly to
about page

403
thanks

Hi,

It looks like you’re getting 404s, not 403s. This would imply you’re using client-side routing but haven’t set up your service to account for it. Check out the React App docs here: https://render.com/docs/deploy-create-react-app#using-client-side-routing

Alan

hi, Thank you for replyi.

OK now it’s going to the main page…
But unfortunately does not go to about page.

let’s say I got a link with slag(product id) that need to go to some product page… how do i do it?

With client-side routing that would all be handled in your code and you would only likely only need the /*/index.html rewrite.

And to confirm the documentation, /* to /index.html should be a rewrite, not a redirect.

Alan

Thank you Ellen this is solved the issue

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