Custom html content on specific route path
Unanswered
Brewer's Blackbird posted this in #help-forum
Brewer's BlackbirdOP
Hello. I couldn't find this in the documentation. I need to display the contents of an html file for one specific route (like /custom-route), i.e. something like a landing page, with a completely different layout, styles and JS functionality completely unrelated to nextjs.
Is it possible to do this?
Perhaps it is worth implementing this through middleware, but how to do this?
I'm using next js 14 version with App Router approach.
Is it possible to do this?
Perhaps it is worth implementing this through middleware, but how to do this?
I'm using next js 14 version with App Router approach.
1 Reply
@Brewer's Blackbird Hello. I couldn't find this in the documentation. I need to display the contents of an html file for one specific route (like /custom-route), i.e. something like a landing page, with a completely different layout, styles and JS functionality completely unrelated to nextjs.
Is it possible to do this?
Perhaps it is worth implementing this through middleware, but how to do this?
I'm using next js 14 version with App Router approach.
you could put that html file in public folder and use rewrite on
next.config.js or middleware for that route