dynamicParams with dot throw 404
Answered
Devon Rex posted this in #help-forum
Devon RexOP
Hello,
I have this project structure
The segments is a dynamic slug .e.g
I am separately getting abc, cde, qet and ofd to generate the page.
However, if one of those params contains a
Any idea how to solve it?
I have this project structure
app/
[lng]/ // i18n
pp/ // directory where dynamic pages are
[segments]
page.tsxThe segments is a dynamic slug .e.g
from-abc-on-cde-to-qet-on-ofdI 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.tsxAny 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
2 Replies
Devon RexOP
any idea?
@Devon Rex 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?
The cause here is you probably have a middleware which treats all URLs with a dot as static files rather than pages
Answer