Statically render your shortened URLs with Astro then redirect the user to the final destination using
<meta http-equiv="refresh" content="1;url=https://github.com/Its-Just-Nans">
<script>
const url = "https://github.com/Its-Just-Nans";
window.location = url;
</script>
Links
- https://github.com/Its-Just-Nans/can-be-useful/tree/main/astro-redirector - repo
- https://n4n5.dev/can-be-useful/astro-redirector/ - demo
New idea just dropped: what about generating PHP files with astro ? 🤔