surishortlink/suri

404 Redirect

Closed this issue · 2 comments

Ayal1 commented

I'm trying to find a way to get a 404 redirect set up, I already have a root (or "/" in the links.json) but I also want any unassigned key/slug. Is this possible and if not, can that functionality be added?

Hey @Ayal1,

Sorry for the delay.

It depends on how you're hosting the static site generated by Suri. For example, with Vercel, you can output a 404.html file. Other providers have similar setups.

Hope that helps!

Ayal1 commented

I'm hosting on render and they have a "Redirects/Rewrites" tab for the static site but adding a wildcard (*) just makes every link forward to the same destination instead of only applying after all the ones in links.json. I can't find anything as to how to set it so it only does that after it checks if the link exists in links.json.