Next.js Discord

Discord Forum

Is it possible to have a static file in a dynamic route?

Answered
୧ʕ•̀ᴥ•́ʔ୨ posted this in #help-forum
Open in Discord
I want to put a static file in a route like [blogpost], let's say, so it will be available at any url for that route, e.g. /myblogpost/myfile.txt
Answered by riský
i think you could have it in public folder and use rewrites/redirects to route to it (the part with dynamic)
View full answer

1 Reply

i think you could have it in public folder and use rewrites/redirects to route to it (the part with dynamic)
Answer