I just deployed my next app on cPanel using buddy works and Github. The overall process was fluent and working properly and i was able to upload my .next folder to public.html folder of cPanel. But after uploading the files and visiting the domain i found that the only page that was correctly rendered was the first page with the route ('/'). On clicking on other routes i was met with the following error page
Only after adding .html extension to the end of the route i was able to get the desired page. Attaching the screenshot for that here
I have gone through all the next js documentation available and i still am not able to sort this issue out properly. If anyone can point to what i am doing wrong here would be great help. Thanks!
You have to add
trailingSlash
key innext.config.js
as follows:and then build your project in the same way you are building now.