#next.js dynamic segment POST, UPDATE, DELETE routes returns 404

1 messages · Page 1 of 1 (latest)

wise smelt
#

I've hosted my Next.js app using cPanel using standalone build. When i call my API route GET/POST without dynamic segment it's all working fine but when i try to call UPDATE/POST/DELETE endpoint in my dynamic segment it returns 404 as you can see in the screenshot.

This only happens when i deploy the standalone build to the cpanel (server.js is ran using node.js v22.22.0). when i ran the standalone build in my local machine it's working fine.

I already tried so many things to resolve this issue such as refactoring my .htaccess and so many more.

Does anyone knows how to fix this issue?

meager mortarBOT
#

🔎 This post has been indexed in our web forum and will be seen by search engines so other users can find it outside Discord

🕵️ Your user profile is private by default and won't be visible to users outside Discord, if you want to be visible in the web forum you can add the "Public Profile" role in id:customize

✅ You can mark a message as the answer for your post with Right click -> Apps -> Mark Solution
(if you don't see the option, try refreshing Discord with Ctrl + R)

severe crown
severe crown
#

@wise smelt solved?

wise smelt