Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

2 Answers 2

up vote 3 down vote accepted

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/

share|improve this answer

Try with Limit directive

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.