Next.js Discord

Discord Forum

dynamicParams with dot throw 404

Answered
Devon Rex posted this in #help-forum
Open in Discord
Devon RexOP
Hello,

I have this project structure

app/
  [lng]/ // i18n
    pp/ // directory where dynamic pages are
      [segments]
        page.tsx


The segments is a dynamic slug .e.g from-abc-on-cde-to-qet-on-ofd
I am separately getting abc, cde, qet and ofd to generate the page.

However, if one of those params contains a ., nextjs throw a 404 error without event reaching the page.tsx

Any idea how to solve it?
Answered by joulev
The cause here is you probably have a middleware which treats all URLs with a dot as static files rather than pages
View full answer

2 Replies