2023-12-15
I noticed that although astrojs itself has a redirect feature, it wasn’t working as expected on the Vercel side. I had listed all the URLs for the old site using this feature, but crucially, they were not being redirected on the Vercel side.
astro.config.mjs:
...
adapter: vercel(),
redirects: {
"/blik": "/blik/blik-0/",
"/posts": "/blog/first",
"/detail/7953ce2a-2703-4ae0-a279-f19427805aad": "/blik/blik-0/",
...
},
...
However, as soon as I noticed, it was fixed. It has been resolved in @astrojs/vercel 6.1.0, so:
https://www.blender-ikkinomi.com/detail/ec1982ce-9825-42dd-ad87-d194bdf3c066
is now correctly redirected to:
https://www.blender-ikkinomi.com/blik/blik-21/
However, there is still an issue reported for cases where there is a trailing ’/’ in the URL.
https://github.com/withastro/astro/issues/9259
The following example is still not redirecting.
https://www.blender-ikkinomi.com/detail/ec1982ce-9825-42dd-ad87-d194bdf3c066/