The Slim Framework support forum has moved to This Tender forum is no longer maintained or monitored.

PUT request giving error "405 Method Not Allowed"

kamran_bhatti58's Avatar


17 May, 2016 12:19 PM

I am building a rest webservice using SLIM which is working fine with GET and POST method but when i tried to Request a PUT method. It is giving me error "405 Method Not Allowed". i don't know what is the problem.
Here is my code:
       $app->put('/user/:id', function($user_id) use ($app)
                echo 'done';

Here is my .htaccess:
         RewriteCond %{REQUEST_FILENAME} !-d
         RewriteCond %{REQUEST_FILENAME} !-f
         RewriteRule ^(.*)$ index.php [QSA,L]
Need help!

  1. 1 Posted by Shane on 18 May, 2016 06:34 AM

    Shane's Avatar

    Thanks for sharing this awesome resource for requesting error.

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


? 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