trailingSlash not working

Hi,

i’m having trouble with the trailingSlash: true setting of nextjs. Its behaving as if the setting is false, my frontend is behaving correctly (so the / does not get removed by next)

Can anyone help?

This happens on https://www.wingsurf.world/

More Info:
This works perfectly with netlify dev

Used Plugins:
Essential Next.js
Next.js cache

Used Custom Redirects:

[[redirects]]
from = “/sitemap.xml”
to = “/api/sitemap”
status = 200
force = true

[[redirects]]
from = “/*”
to = “/404/”
status = 404

Cheers,
Nexum

SOLVED!

In case anyone runs into this weird problem, check if all your routes are index.js files, for me i head a /article/[slug].js, changed it to /article/[slug]/index.js and everything now works fine!

Sill no idea why the setting works in dev but not in production, but this way works perfectly and totally makes sense!

1 Like