Hello, I’ve got a react-app with flux routing and I’m trying to send an activation link to my users after they sign up but the link always resolves to a broken or missing link, Can anyone help?
hey @Nana-kwame - we’ll need to know more information before we can assist.
which site is this regarding? what kind of an activation link are you sending? how is the link missing or broken? Does this work locally? thanks.
Hi, @Nana-kwame, your app might need the single-page application redirect rule:
Would you please test adding that rule to this site and let us know if it works to fix this issue or not?
Hello @luke, I have added that rule
Hi, @Nana-kwame, is this create react app (CRA)? If so, I think
_redirects needs to be in the directory
public which will copy it unchanged to the publish directory (which is
build for this site).
This is based on this documentation for CRA:
I did check the site and it isn’t working because it isn’t being read currently. Also, above you do not need the
/forgot-password rule. Just use the first line:
/* /index.html 200
I looked at the site again and I’m 100% certain that adding just that one rule in
_redirects and putting that file into the directory
public (if this is CRA) will fix the issue.
Note, you’ll need this same redirects rule for any sites doing client side routing like this site does.
_redirects to the directory
public doesn’t work, I’m happy to take another look.
Thanks @luke, I moved the _redirects file to the public directory and everything worked.