next.js dynamic segment POST, UPDATE, DELETE routes returns 404
Unanswered
Eurasian Hobby posted this in #help-forum
Eurasian HobbyOP
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
Does anyone knows how to fix this issue?
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?
1 Reply
@Eurasian Hobby 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?
are you able to use server actions in production normally or do they also not work?