404 error Erro will apear when i call my api url after migration

Hi all,
I have written rest API using a slim framework. Now I have migrated my code from one server to other servers. When I call my API map routing I am getting 404 error. and after the renaming of the same API map routing with a single character the function is started calling.

May I know why it is not called with the actual function name.

example :
$app->map(’/getlatestpackage’, function() use ($app, $DB, $CFG) { // actual map url is https://myurl/getlatestpackage is not calling
echo “hi”

}

$app->map(’/getlatestpackage1’, function() use ($app, $DB, $CFG) {
// after the renaming of actual map url is https://myurl/getlatestpackage1 is started calling now
echo “hi”

}

The most likely reason would seem to be a misconfigured webserver. Are you using Apache? When you get the 404, what does your server log (like Apache’s access_log) say the URI is that is being requested? If you comment out all other routes except /getlatestpackage do you still get the 404?

Use following steps:

  1. Does the https://myurl/getlatestpackage is using any caching? Try to purge the cache
  2. Check the call of getlatestpackage is loads the right controller