Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
up vote 4 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

share|improve this answer

Try with Limit directive

share|improve this answer

Your Answer


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.