- Site name: hedgehog.markets
A path in my nextjs app /predictions/[publickey]
uses getStaticProps
& getStaticPaths
in order to generate the appropriate meta tags.
However, the prebuilding causes the dynamic path to be lowercased on page load breaking the site since it needs to be base58
, thus mix-cased.
The workaround seems to be to add a redirect rule:
netlify.toml
[[redirects]]
from = "/predictions/:publickey"
to = "/predictions/:publickey"
status = 200
force = true
I tried 301 at first, but it caused infinite redirects.
This appears to work fine for all prebuilt pages, however since these paths are user generated, new posts will 404 on page load.
Is it possible to allow Netlify to load the appropriate page even if it wasn’t prebuilt?