The Slim Framework support forum has moved to http://discourse.slimframework.com. This Tender forum is no longer maintained or monitored.

404 Errors

sushil kumar yadav's Avatar

sushil kumar yadav

07 Mar, 2018 06:45 AM

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"

}

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac