Hi,
I deployed a react web site and it works great. Now i’d like to know how to make direct libk working.
For example i have my site: https://www.kidsandfun.be and i need to send a direct link to kidsandfun
But it doesn’t work. How can i achieve this?
Thanks
1 Like
al_ps
2
Hi,
That behavior sounds like you’re using client-side routing (e.g. React Router) on a Static Site.
That would require a rewrite rule, like the one covered in our docs here: https://render.com/docs/deploy-create-react-app#using-client-side-routing
Kind regards
Alan
1 Like
Hi,
Thanks for your reply but i’ve already added a rewrite and its not what i need.
When i go to the direct libk it redirect to the home page.
My need is to go to the required page. Are there a way to do this?
Thanks
1 Like
al_ps
4
The docs I shared are the way to have deep links with client-side routing.
Can you share a screenshot of your rewrites?
Alan
Hi,
Here is my rewrite url that goes to the home
Thanks
al_ps
6
That wouldn’t work for client-side routing. It’s also a redirect not a rewrite.
Could you replace it with the rewrite shown in the docs to give that another try: https://render.com/docs/deploy-create-react-app#using-client-side-routing
Alan
1 Like
great it seems working
thanks a lot for your help
system
Closed
8
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.