5

I would like to enable the PUT and DELETE methods to any .php script on my Apache web server.

Currently I only have this answer :

The requested method PUT is not allowed for the URL /something.php

I'm running Apache2 / PHP5 on a Debian lenny.

2 Answers 2

5

Thanks, @Abhi for pointing to my blog post on the subject. If it weren't for referrer logs I wouldn't have been aware of this page. It seems that I am not the only one who has run into this question.

The short answer:

You need to enable mod_actions and mod_rewrite in Apache, add a <Limit> and <LimitExcept> block to your <Directory> block, and set up a RewriteCond %{REQUEST_METHOD} (PUT|DELETE) and a RewriteRule .* something.php.

For the long answer see my post at http://www.evardsson.com/blog/2010/04/27/apache-and-php-http-put-voodoo/

2

Try with Limit directive

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .